1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed problem with auto-repair of MyISAM tables

Fixed bug in ISAM and MyISAM when updating from multiple-processes


Docs/manual.texi:
  Updated changelog
client/mysqladmin.c:
  Upgraded version number because the change of llstr() is visible
extra/perror.c:
  Added new error message
include/my_base.h:
  Added HA_ERR_CRASHED_ON_USAGE
isam/rnext.c:
  Fixed bug when updating from multiple-processes
isam/rprev.c:
  Fixed bug when updating from multiple-processes
libmysql/libmysql.c:
  Fixed that mysql->options.client_flag was used properly
myisam/mi_locking.c:
  Fixed bug when updating from multiple-processes
myisam/mi_open.c:
  Fixed bug when updating from multiple-processes
  Added HA_ERR_CRASHED_ON_USAGE
myisam/mi_rnext.c:
  Fixed bug when updating from multiple-processes
myisam/mi_rprev.c:
  Fixed bug when updating from multiple-processes
myisam/myisamchk.c:
  Added HA_ERR_CRASHED_ON_USAGE
sql/sql_base.cc:
  Fixed problem with auto-repair of MyISAM tables
sql/table.cc:
  Fixed problem with auto-repair of MyISAM tables
This commit is contained in:
unknown
2000-11-21 03:43:34 +02:00
parent 675d1803db
commit 7c881e34ef
14 changed files with 60 additions and 38 deletions

View File

@ -1162,25 +1162,26 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
HA_TRY_READ_ONLY),
READ_KEYINFO | COMPUTE_TYPES | EXTRA_RECORD,
ha_open_options | HA_OPEN_FOR_REPAIR,
entry) ||
entry) || ! entry->file ||
(entry->file->is_crashed() && entry->file->check_and_repair(thd)))
{
/* Give right error message */
thd->net.last_error[0]=0;
thd->net.last_errno=0;
entry->file->print_error(HA_ERR_CRASHED,MYF(0));
my_error(ER_NOT_KEYFILE, MYF(0), name, my_errno);
sql_print_error("Error: Couldn't repair table: %s.%s",db,name);
closefrm(entry);
if (entry->file)
closefrm(entry);
error=1;
}
else
{
thd->net.last_error[0]=0; // Clear error message
thd->net.last_error[0]=0; // Clear error message
thd->net.last_errno=0;
}
unlock_table_name(thd,&table_list);
if (locked)
pthread_mutex_lock(&LOCK_open); // Get back original lock
unlock_table_name(thd,&table_list);
if (error)
goto err;
}