List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:July 7 1999 11:29am
Subject:Re: MySql & Qube 2
View as plain text  
>>>>> "takeshi" == takeshi  <takeshi@stripped> writes:

takeshi> At Tue, 6 Jul 1999 14:07:56 +0100,
takeshi> Franck ZIMMER <fzimmer@stripped> wrote:
>> 
>> I tried to install MySql version 3.22.14, 3.22.23b on the Qube 2 (mips).
>> Linux code name fargo kernel 2.0.34
>> (Compiled with gcc 2.7.2)
>> 
>> The installation seems to work.
>> But if I try the sql functions MAX(), MIN() and AVG(), each functions brings the
>> result 0.

takeshi> me too. I got `0'.
takeshi> and, numeric values are broken.

>> How-To-Repeat:

takeshi> [root@cube /root]# mysql test

mysql> create table a (a int, d double);

mysql> insert into a values (30, 20.0);
mysql> insert into a values (123, 67.23);
mysql> insert into a values (10, 45.098);

mysql> select * from a;
takeshi>
> +------+----------------------------------------------------------------------------------------------+
takeshi> | a    | d                                                                    
>                        |
takeshi>
> +------+----------------------------------------------------------------------------------------------+
takeshi> |   30 |                                                                      
>                 0.0000 |
takeshi> |  123 |
> 427698049712232164500227837098811565868386169064859043663724062914674140928483763683328.0000
> |
takeshi> |   10 |                                                                     
> 387381585965481984.0000 |
takeshi>
> +------+----------------------------------------------------------------------------------------------+
takeshi> 3 rows in set (0.00 sec)

<cut>

Hi!

I don't have access to a mips computer;  Any change you can debug
this?

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

Note that this *could* be a bug in gcc 2.7

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