[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] MySQL



Hi Drew, I encountered the same problem a week ago and found the fix for the
MySQL problem you described.

From: Drew Nichols <drewnichols@xxxxxxxxxxx>

> I should be getting this:
> mysql> select SQRT(4);
>              -> 2.000000
> But I am currently getting this:
> mysql> select SQRT(4);
> +----------+
> | SQRT(4)  |
> +----------+
> | 0.000000 |
> +----------+
> I can't do sum() or avg().  I cant do max() or min()  I can't
mathematically
> calculate anything. :)  If you could look into it, I would appreciate it.

BTW, I asked the same question a week ago on this list and no one responded
so I tried the MySQL mailing list.  You can subscribe by sending a blank
email to mysql-subscribe@xxxxxxxxxxxxxxx .  The following corresponds to
step 5 below.  I removed the current mysql version from my server using
rpm -e and then installed the latest stable version (3.22.27) from
mysql.net.  You can find it at http://mysql.net/download_3.22.html.
Download the MySQL tar file to your server, untar it and then read the
install file.  I believe it is INSTALL-SOURCE.

I have only a few months of linux experience and I was an Industrial
Engineer until earlier this year so if these steps seem complex don't worry
b/c I got it to work the first time I tried and there are clearly more
skilled linux users on this site than me.  I'd recommend backing up your
mysql grant tables and any other tables before trying this just in case they
get wiped out.  You can always copy the back to the correct directory later.

Here is the fix.  It worked for me on a RaQ2, I can't guarantee it will work
for you and there may be other ways to get the result you desire.  One
caveat is that you will no longer be able to specify a host of 'localhost';
you will have to specifiy the FQDN host such as 'http://www.domain.com'.
I'm quote surprised no one on the cobalt users list responded to my email
from October 18th concerning this problem.  Either very few people use MySQL
or they don't require what I consider necessary functionality.

Steven {steven@xxxxxxxxxxxx}

First use gcc 2.95.2. Second, you must rebuild MySQL by starting from
a fresh tarball and do it this way :

 1. get next glibc packages. these are fixed pthread problems!
   glibc-profile-2.0.7-29C2.mips.rpm
   glibc-debug-2.0.7-29C2.mips.rpm
   glibc-devel-2.0.7-29C2.mips.rpm
   glibc-2.0.7-29C2.mips.rpm

   site:
     ftp://ftp.cobaltnet.com/pub/experimental/

 2. install new glibc
   rpm -Uvh --force --nodeps glibc-*-29C2.mips.rpm

   ldconfig

 3. get egcs & libstdc++
    egcs-1.0.2-9.mips.rpm
    egcs-c++-1.0.2-9.mips.rpm
    egcs-g77-1.0.2-9.mips.rpm
    egcs-objc-1.0.2-9.mips.rpm
    libstdc++-2.8.0-9.mips.rpm
    libstdc++-devel-2.8.0-9.mips.rpm

 4. install egcs & libstdc++
     rpm -e gcc-objc
     rpm -e gcc-c++
     rpm -e gcc
     rpm -Uvh egcs*-1.0.2-9.mips.rpm

     rpm -e libg++-devel-2.7.2.8
     rpm -i libstdc++*-2.8.0-9.mips.rpm

 5. build mysql
  ./configure --with-debug \
            --disable-assembler \
            --disable-shared \
            --with-mysqld-ldflags="-all-static" \
            --with-client-ldflags="-all-static" \
            mipsel-unknown-linux-gnu

  6. check floating point
     select MOD(29.0,9.0);
     select ABS(-32.4);
     select CEILING(1.23);
     select CEILING(-1.23);
     select FLOOR(-1.23);
     select ROUND(-1.58);
     select LEAST(34.0,3.0,5.0,767.0);
     select CURDATE() + 0;
     select CURTIME() + 0;
     select FROM_UNIXTIME(875996580) + 0;