Selke, Gisbert W. | 28 Feb 2012 22:20
Picon

AW: bind parameter guessing corrupts results

> -----Ursprüngliche Nachricht-----
> Von: Marc Lehmann [mailto:schmorp <at> schmorp.de]
> Gesendet: Donnerstag, 23. Februar 2012 04:28
> It would be great if this were actually implemented, but the current code
> is data-dependent and quotes some numbers but not others.
Same, btw, for Gisle Aas's data::Dump -- it quotes some numbers but not others (unless you use quote(), in
which case it consistently quotes all numbers).
That's the price you pay for dwimmyness: sometimes it bites you. Especially when you least expect it.

\Gisbert

--

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/perl

Marc Lehmann | 29 Feb 2012 11:28
Picon
Favicon

Re: AW: bind parameter guessing corrupts results

On Tue, Feb 28, 2012 at 10:20:34PM +0100, "Selke, Gisbert W." <Gisbert.Selke <at> wido.bv.aok.de> wrote:
> > -----Ursprüngliche Nachricht-----
> > Von: Marc Lehmann [mailto:schmorp <at> schmorp.de]
> > Gesendet: Donnerstag, 23. Februar 2012 04:28
> > It would be great if this were actually implemented, but the current code
> > is data-dependent and quotes some numbers but not others.
> Same, btw, for Gisle Aas's data::Dump -- it quotes some numbers but not others (unless you use quote(), in
which case it consistently quotes all numbers).
> That's the price you pay for dwimmyness: sometimes it bites you. Especially when you least expect it.

Well, the solution I outlined has the advantage of being dwim but at
the same time doesn't suffer from arbitraryness - that is, there is a
consistent way of marking numbers as numbers, even with perl.

So your argument is wrong - the problem is not dwim here.

The problem is the arbitraryness - even if perl thinks something is a
number and doesn't even have alternatives, dbd::mysql would still quote it
if it becomes too big, and this behaviour isn't even clearly documented.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp <at> schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\

--

-- 
MySQL Perl Mailing List
(Continue reading)


Gmane