Description: ------------
The following sequence corrupts the table with MySQL 4.0.3-beta. It works fine with 3.23.51. LOCK TABLES t WRITE; DELETE FROM t; OPTIMIZE TABLE t; How to reproduce: ----------------- mysql> SELECT version(); +------------+ | version() | +------------+ | 4.0.3-beta | +------------+ 1 row in set (0.00 sec) mysql> CREATE TABLE t (a INT); Query OK, 0 rows affected (0.00 sec) mysql> INSERT t VALUES (1), (2), (3); Query OK, 3 rows affected (0.00 sec) Records: 3 Duplicates: 0 Warnings: 0 mysql> LOCK TABLES t WRITE; Query OK, 0 rows affected (0.00 sec) mysql> DELETE FROM t; Query OK, 3 rows affected (0.00 sec) mysql> OPTIMIZE TABLE t; +--------+----------+----------+------------------------------------+ | Table | Op | Msg_type | Msg_text | +--------+----------+----------+------------------------------------+ | test.t | optimize | warning | Number of rows changed from 0 to 3 | | test.t | optimize | status | OK | +--------+----------+----------+------------------------------------+ 2 rows in set (0.00 sec) mysql> SELECT * FROM t; ERROR 1030: Got error 127 from table handler mysql> CHECK TABLE t; +--------+-------+----------+----------------------------------------------+ | Table | Op | Msg_type | Msg_text | +--------+-------+----------+----------------------------------------------+ | test.t | check | error | Size of datafile is: 0 Should be: 15 | | test.t | check | error | Corrupt | +--------+-------+----------+----------------------------------------------+ 2 rows in set (0.00 sec) Environment: ------------ System: Linux ***.fr 2.4.19 #3 SMP Fri Aug 9 15:18:06 CEST 2002 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/ccGCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110) Compilation info: CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' LDFLAGS='' LIBC: lrwxrwxrwx 1 root root 13 Jul 18 13:18 /lib/libc.so.6 -> libc-2.2.5.so -rwxr-xr-x 1 root root 1260480 Apr 15 15:44 /lib/libc-2.2.5.so -rw-r--r-- 1 root root 2310808 Apr 15 16:02 /usr/lib/libc.a -rw-r--r-- 1 root root 178 Apr 15 15:55 /usr/lib/libc.so Configure command: ./configure --with-innodb --localstatedir=/data/mysql --------------------------------------------------------------------- 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