Comment 13 for bug 408694

Revision history for this message
Ross M. (rwmcfa1) wrote : Re: [Bug 408694] Re: main.func_math fails due to precision error

On Tue, Aug 4, 2009 at 9:21 AM, Jay Pipes<email address hidden> wrote:
> Yes, weird indeed :)

a bit more digging had lead me away from the log function/path.

stepping through both mysql5.1 and drizzle i've found that in
Item::send case (MYSQL|DRIZZLE)_TYPE_DOUBLE the line

  double nr= val_real();

ends up with the exact same value. the next applicable line is:

 result= protocol->store(nr, decimals, buffer);

the value in buffer in mysql51 is:

$2 = {Ptr = 0x7fffffbbb1b0 "2", str_length = 1, Alloced_length = 766,
  alloced = false, str_charset = 0x9bd940}

the value in buffer on drizzle is:

$2 = {Ptr = 0x7ffffebe4c80 "2.", '0' <repeats 15 times>, "4", str_length = 18,
  Alloced_length = 1021, alloced = false, str_charset = 0x9fd9c0}

so something down inside of protocol->store is different between the
two. i'll be off of here for a couple hours, but once i'm back i'm
going to start walking down in that code and see where i get, but i
assume there are likely large differences in the protocol between the
two (if protocol ends up meaning what i currently guess that it does.)

best,
--
-rm