mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into chilla.local:/home/mydev/mysql-4.1--team sql/ha_myisam.cc: Auto merged
This commit is contained in:
commit
03089d8977
1 changed files with 16 additions and 0 deletions
|
@ -902,6 +902,22 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize)
|
||||||
ha_rows rows= file->state->records;
|
ha_rows rows= file->state->records;
|
||||||
DBUG_ENTER("ha_myisam::repair");
|
DBUG_ENTER("ha_myisam::repair");
|
||||||
|
|
||||||
|
/*
|
||||||
|
Normally this method is entered with a properly opened table. If the
|
||||||
|
repair fails, it can be repeated with more elaborate options. Under
|
||||||
|
special circumstances it can happen that a repair fails so that it
|
||||||
|
closed the data file and cannot re-open it. In this case file->dfile
|
||||||
|
is set to -1. We must not try another repair without an open data
|
||||||
|
file. (Bug #25289)
|
||||||
|
*/
|
||||||
|
if (file->dfile == -1)
|
||||||
|
{
|
||||||
|
sql_print_information("Retrying repair of: '%s' failed. "
|
||||||
|
"Please try REPAIR EXTENDED or myisamchk",
|
||||||
|
table->path);
|
||||||
|
DBUG_RETURN(HA_ADMIN_FAILED);
|
||||||
|
}
|
||||||
|
|
||||||
param.db_name = table->table_cache_key;
|
param.db_name = table->table_cache_key;
|
||||||
param.table_name = table->table_name;
|
param.table_name = table->table_name;
|
||||||
param.tmpfile_createflag = O_RDWR | O_TRUNC;
|
param.tmpfile_createflag = O_RDWR | O_TRUNC;
|
||||||
|
|
Loading…
Reference in a new issue