Hi! On Sep 09, [EMAIL PROTECTED] wrote: > > I'm using MySQL v4.0.12 on Redhat Linux 9.0 > > I have a python script (using the MySQLdb module) that inserts a large > batch of records to several MyISAM tables. The largest table (named > 'log') has 20 columns. A single column defines the primary key. There > isn't an auto increment column. Many of the other columns in the log > table are indexed as well. > > This seemed like an ideal case to DISABLE KEYS, insert the data and > then ENABLE KEYS based on the MySQL documentation. And running some time > tests proves that this approach runs much faster. > > However, in doing so, the log table becomes corrupted (or at least the > indecies do). > > mysql> select * from log order by log_id; > ERROR 1030: Got error 124 from table handler
% perror 124 124 = Wrong index given to function MySQL tries to use disabled index, that is in some part of code it thinks index is ok, and later it thinks the index is disabled. manual section "Changes in release 4.0.13 (16 May 2003)" : * Fixed a bug in `ALTER TABLE ENABLE / DISABLE KEYS' which failed to force a refresh of table data in the cache. :) Please, upgrade. Regards, Sergei -- __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]