Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
MySQL++ - Programming with the C++ API to MySQL
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
CRITICAL BUG in 4.1: innodb_file_per_table can corrupt secondary indexes

CRITICAL BUG in 4.1: innodb_file_per_table can corrupt secondary indexes

2004-12-22       - By Heikki Tuuri

 Back
Hi!

http://bugs.mysql.com/bug.php?id=7496

A critical bug found: if one uses the 4.1 my.cnf option

innodb_file_per_table

to create tables, and some of the secondary index records are inserted to
the InnoDB 'insert buffer', then after a normal mysqld shutdown InnoDB loses
all those secondary index records! CHECK TABLE will print to the mysqld .err
log that there are less records in the secondary index than in the clustered
index.

"
heikki@(protected):~/mysql-4.1/sql> ./mysqld
041222 17:14:36 InnoDB: Started; log sequence number 0 128463738
041222 17:14:36 [Warning] mysql.user table is not updated to new password
format
; Disabling new password usage until mysql_fix_privilege_tables is run
./mysqld: ready for connections.
Version: '4.1.9-debug-log' socket: '/home/heikki/bugsocket' port: 3307
Source
distribution
Error: index `idx_symbole` of table `test/alex1` contains 185811 entries,
should
be 185956
Error: index `idx_symbole3` of table `test/alex1` contains 184246 entries,
shoul
d be 185956
"

The corruption does not occur after a mysqld crash. It only follows from a
normal shutdown.

Workarounds:

1) Only 'shut down' mysqld with killall -9 mysqld :).

or

2) Before shutdown, let the server be idle, so that SHOW INNODB STATUS shows
the 'main thread waiting for server activity'. Then a normal shutdown is
safe.

How to repeat:

Do heavy random inserts to the secondary indexes of a big table. Then some
of the inserts end up in the insert buffer. Shut down mysqld quickly. At the
next startup the table is corrupt.

Suggested fix:

Will be fixed in 4.1.9. We let InnoDB do a 'crash-like' startup always.

This is the worst InnoDB corruption bug in 3 years. I apologize that it
slipped through tests.

Heikki


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/win32?unsub=mysql@(protected)


Earn $52 per hosting referral at Lunarpages.