Bugzilla – Bug 133208
MySQL number overflow problem
Last modified: 2006-01-04 14:02:29 UTC
Problem exists in both SuSE 9.3 Pro and SuSE 10.0. Does not happen on other distros (FreeBSD, Debian, Trustix) using same version of database. Mysql 4.1.13-3 (SUSE 10.0) Mysql 4.1.10a (SUSE 9.3) Mysql functions min and max incorrectly returns negative numbers for very large integers. Duplicate with: create temporary table xyzzy (id int(10) unsigned); insert into xyzzy values (4294967093); insert into xyzzy values (4294967094); insert into xyzzy values (4294967095); select * from xyzzy; +------------+ | id | +------------+ | 4294967093 | | 4294967094 | | 4294967095 | +------------+ 3 rows in set (0.00 sec) select min(id),max(id) from xyzzy; +---------+---------+ | min(id) | max(id) | +---------+---------+ | -203 | -201 | +---------+---------+ 1 row in set (0.00 sec)
I have downloaded mysql-max-4.1.15-pc-linux-gnu-i686-glibc23 from mysql.org and tested it on SUSE Linux 10.0. It worked correctly and did not have the above problem. Problem appears isolated to the SUSE builds of mysql.
The mysqld downloaded from mysql.org installed in /usr/local/mysql and using the installed my.cnf works correctly. This includes connecting to the database from the installed suse mysql command line tool. Problem appears to be with mysqld. Comparison of mysqlds: [SUSE] /usr/sbin/mysqld: linux-gate.so.1 => (0xffffe000) librt.so.1 => /lib/tls/librt.so.1 (0x40021000) libz.so.1 => /lib/libz.so.1 (0x4002a000) libwrap.so.0 => /lib/libwrap.so.0 (0x4003b000) libdl.so.2 => /lib/libdl.so.2 (0x40043000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0x40047000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x40059000) libnsl.so.1 => /lib/libnsl.so.1 (0x4008c000) libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x400a1000) libm.so.6 => /lib/tls/libm.so.6 (0x4015f000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40182000) libc.so.6 => /lib/tls/libc.so.6 (0x4018a000) /lib/ld-linux.so.2 (0x40000000) [MySQL] /usr/local/mysql/bin/mysqld: linux-gate.so.1 => (0xffffe000) librt.so.1 => /lib/tls/librt.so.1 (0x40021000) libz.so.1 => /lib/libz.so.1 (0x4002a000) libdl.so.2 => /lib/libdl.so.2 (0x4003b000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0x4003f000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x40051000) libnsl.so.1 => /lib/libnsl.so.1 (0x40083000) libm.so.6 => /lib/tls/libm.so.6 (0x40099000) libc.so.6 => /lib/tls/libc.so.6 (0x400bc000) /lib/ld-linux.so.2 (0x40000000) Extra libs in SUSE: libgcc_s, libwrap, and libstdc++
Oops: The ldd dumps from SUSE above are from a 9.3 system and not from the 10.0 system. Sorry about that. Also, one new oddity (and my last comment, I hope): I installed mysql 4.1.15 (from mysql.org) to my user's home directory as my normal user account (and verified that my user account did not have access to /etc/dbconfig and was not in group mysql); confirmed that 4.1.15 worked; and then shut 4.1.15 down. After I confirmed it was down, I deleted all the files. Now, when I connect to the system's mysql (4.1.13-Max) and run the test again, I get the correct results. I have not rebooted to see if the problem returns. I have confirmed that it works for other users and not just my user account. Very strange. The only other change to the system was YOU updating two (I think) files earlier today.
i am trying to reproduce this bug. But: mysql> select * from xyzzy -> ; +------------+ | id | +------------+ | 4294967093 | | 4294967094 | | 4294967095 | +------------+ 3 rows in set (0.00 sec) mysql> select min(id), max(id) from xyzzy; +------------+------------+ | min(id) | max(id) | +------------+------------+ | 4294967093 | 4294967095 | +------------+------------+ 1 row in set (0.00 sec) mysql> I am using clear instalation of mysql, on suse 10.0 on i686, mysql-4.1.13-3 Do you using fresh installalation of mysql? If not could you test it on some fresh install? Thanks
Any news?
I have not been able to re-install everything to try this again from a fresh install. I might be able to in about a week, but right now I've got a really tight deadline that I have to get through first. I think the problem is library related, but can't prove it. See previous note about loading precompiled from mysql directly and things magically getting fixed.
Close bug, please reopen it, if you have more inforamtion to investigate this bug.