List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:July 8 1999 3:48am
Subject:RE: MySql & Qube 2
View as plain text  
>>>>> "Bonis," == Bonis, Wim <bonis@stripped> writes:

>> The bug should be in this functions: (sql/field.cc):
>> 
>> void Field_double::store(double nr)
>> {
>> if (decimals != 31)
>> nr=floor(nr*log_10[decimals]+0.5)/log_10[decimals]; // To 
>> fixed point
>> doublestore(ptr,nr);
>> }
>> 
>> double Field_double::val_real(void)
>> {
>> double j; doubleget(j,ptr);
>> return j;
>> }
>> 
>> The doublestore / doubleget macros are defined in include/global.h

Bonis,> I tried it on a mips(qube2) but the functions you quoted may not have been
Bonis,> executed. I have added printf´s into the two functions but the following
Bonis,> session did not trigger them:

mysql> select 1.01+1;
Bonis,> +---------------------------------------------------------------------------
Bonis,> ----------------------------------------------------------------------------
Bonis,> ----------------+
Bonis,> | 1.01+1
Bonis,> |
Bonis,> +---------------------------------------------------------------------------
Bonis,> ----------------------------------------------------------------------------
Bonis,> ----------------+
Bonis,> |
Bonis,> -416149464319656471792043282545976376852126312593339196866087348513668409107
Bonis,> 6452136392930344036015456104570933577105313965196989532097205520492824844667
Bonis,> 5369066496.00 |
Bonis,> +---------------------------------------------------------------------------
Bonis,> ----------------------------------------------------------------------------
Bonis,> ----------------+

The above will not trigger the Field_double code.  The code is
triggered if you insert/retrieve something to/from a column declared
as 'double'.

Bonis,> here is what the developers of the QUBE say to that Problem:

Bonis,> Maybe you could help them (and us, the users of the qube) to fix the
Bonis,> Problem.

<cut>

Bonis,> egcs-1.0.2-9 that i use does not handle alignment issues related to double
Bonis,> arguments consistently. nor does the latest port available for mipsel. a
Bonis,> patch
Bonis,> has recently been released for i386 (feb 99) and there is quite some
Bonis,> dicussion
Bonis,> on it (search for "egcs double alignment" on the web).

Bonis,> more details:

Bonis,> mysql uses an Item_real C++ object that has a constructor which takes
Bonis,> arguments
Bonis,> (const char *, double, uint, uint).  though the caller aligns the double at
Bonis,> a
Bonis,> 64-bit boundary, the code generated for the constructor accesses the double
Bonis,> from the 32-bit pad after the const char *.  i could be wrong as the
Bonis,> fprintf i use could have the same problems too. otoh, the fprintf that mysql
Bonis,> uses to print out the result could be hosed.  getting gdb to break execution
Bonis,> when the constructor is invoked has been abortive.

<cut>

If you have problems debugging mysqld because its threaded, the
--one-thread switch to mysqld may help!

Does the above aligment problem also exists with egcs 1.1.2 ?

Can you try to verify if the bug is really in the call to the
constructor or in the double -> char conversion.

A breakpoint at String::set(double num,uint decimals) should answer
this one...

Regards,
Monty
Thread
MySql & Qube 2Franck ZIMMER6 Jul
  • Re: MySql & Qube 2Fraser MacKenzie6 Jul
    • Re: MySql & Qube 2Michael Widenius7 Jul
      • Re: MySql & Qube 2Fraser MacKenzie7 Jul
        • Closing port 3306 without a firewall?Matt Duggan7 Jul
          • Re: Closing port 3306 without a firewall?(Chris Adams)7 Jul
          • Re: Closing port 3306 without a firewall?Matt Duggan7 Jul
            • Re: Closing port 3306 without a firewall?Chris Adams7 Jul
          • Re: Closing port 3306 without a firewall?Vivek Khera7 Jul
        • index is gone in 3.23.0-alphaDino7 Jul
          • index is gone in 3.23.0-alphaMichael Widenius7 Jul
  • Re: MySql & Qube 2T├Ánu Samuel6 Jul
  • Re: MySql & Qube 2takeshi7 Jul
    • Re: MySql & Qube 2Michael Widenius7 Jul
      • MySQL Lang Supportclhubert17 Jul
        • MySQL Lang SupportMichael Widenius30 Jul
RE: MySql & Qube 2Wim Bonis8 Jul
  • RE: MySql & Qube 2Michael Widenius8 Jul
    • RE: MySql & Qube 2takeshi8 Jul
      • RE: MySql & Qube 2Michael Widenius8 Jul
    • RE: MySql & Qube 2takeshi8 Jul
      • RE: MySql & Qube 2Michael Widenius8 Jul
        • RE: MySql & Qube 2takeshi8 Jul
          • FIX!! (RE: MySql & Qube 2)takeshi17 Jul