>Description: Using the following statement on empyt innobase tables crashes the MySQL-Server: select MAX(col3) from crashTable where col1 = 1 and col2 = 7;
>How-To-Repeat: CREATE TABLE IF NOT EXISTS crashTable ( col1 SMALLINT UNSIGNED NOT NULL, col2 SMALLINT UNSIGNED NOT NULL, col3 INT UNSIGNED NOT NULL, col4 INT UNSIGNED NOT NULL, txtLen INT UNSIGNED, txt LONGBLOB, UNIQUE crashKey(col1, col2, col3, col4) ) TYPE = InnoDB; select MAX(col3) from crashTable where col1 = 1 and col2 = 7; Note: this only crashes when the table type is innobase - the select works fine with MyISAM. Note2: partial query statements, i.e. "select MAX(col3) from crashTable" and "select col3 from crashTable where col1 = 1 and col2 = 7" work fine. Note3: the statement crashes the server only when the table is EMPTY. >Fix: Inserting a default record with any values prevents a crash and delivers a correct result (provided that the default record does not contain values that might be 'real' and thus read...) INSERT INTO crashTable VALUES (0, 0, 0, 0, NULL, NULL); >Submitter-Id: Ove >Originator: Ove >Organization: AdNovum Informatik AG +---------------------------------------------------------------------+ Ove Hiltwein mailto:[EMAIL PROTECTED] Software Architect und Software Engineer dipl. Informatik-Ing. ETH AdNovum Informatik AG http://www.adnovum.ch phone: ++41 1 272 6111 Roentgenstrasse 22, CH-8005 Zuerich fax: ++41 1 272 6312 +---------------------------------------------------------------------+ AdNovum Software Inc. San Mateo, CA 94404 phone: ++1 650 525 9322 1400 Fashion Island Boulevard, Suite 309 fax: ++1 650 525 9324 +------------------Fight for your right to bare arms------------------+ > >MySQL support: none >Synopsis: "select MAX(col3) ..." statement on empty innobase table crashes MySQL >server >Severity: non-critical >Priority: low >Category: mysql >Class: sw-bug >Release: mysql-3.23.43 (Source distribution) >Environment: System: SunOS lucas 5.6 Generic_105181-26 sun4u sparc SUNW,Ultra-5_10 Architecture: sun4 Some paths: /bin/perl /home/ove/.bin/make /opt/pd/bin/gcc /opt/SUNWspro/bin/cc GCC: Reading specs from /opt/pd/gcc-2.95.3/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/specs gcc version 2.95.3 20010315 (release) Compilation info: CC='/opt/pd/gcc-2.95.2/bin/gcc' CFLAGS='-O3' CXX='/opt/pd/gcc-2.95.2/bin/gcc' CXXFLAGS='-O3 -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' LIBC: -rw-r--r-- 1 bin bin 1623504 May 25 04:55 /lib/libc.a lrwxrwxrwx 1 root root 11 Jun 8 19:59 /lib/libc.so -> ./libc.so.1 -rwxr-xr-x 1 bin bin 1024888 May 25 04:55 /lib/libc.so.1 -rw-r--r-- 1 bin bin 1623504 May 25 04:55 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Jun 8 19:59 /usr/lib/libc.so -> ./libc.so.1 -rwxr-xr-x 1 bin bin 1024888 May 25 04:55 /usr/lib/libc.so.1 Configure command: ./configure --prefix=/opt/mysql --localstatedir=$LOCALSTATEDIR --with-innodb --without-debug Perl: This is perl, version 4.0 --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php