mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
BUG#5625 - MyISAM Index corruption on ALTER TABLE x ENABLE KEYS due to full tmpdir.
Added a try to a normal repair() if repair_by_sort() failed. This was not done with ENABLE KEYS and OPTIMIZE TABLE. Fixed error code handling in mysql_alter_table(). sql/ha_myisam.cc: BUG#5625 - MyISAM Index corruption on ALTER TABLE x ENABLE KEYS due to full tmpdir. Added a try to a normal repair() if repair_by_sort() failed. This was not done with ENABLE KEYS and OPTIMIZE TABLE. sql/sql_table.cc: BUG#5625 - MyISAM Index corruption on ALTER TABLE x ENABLE KEYS due to full tmpdir. Added a translation from 'bool' return value to '< 0' error indication, which is used within mysql_execute_command() and must as such be handed over by mysql_alter_table(). A returncode >= 0 is interpreted as 'I have already called send_ok()'.
This commit is contained in:
@@ -1614,7 +1614,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
VOID(pthread_mutex_lock(&LOCK_open));
|
||||
wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
|
||||
VOID(pthread_mutex_unlock(&LOCK_open));
|
||||
error= table->file->activate_all_index(thd);
|
||||
error= (table->file->activate_all_index(thd) ? -1 : 0);
|
||||
/* COND_refresh will be signaled in close_thread_tables() */
|
||||
break;
|
||||
case DISABLE:
|
||||
|
Reference in New Issue
Block a user