1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

ALTER TABLE closes all open HANDLER's for the table in question

fixed error handling in HANDLER ... READ FIRST
This commit is contained in:
serg@serg.mysql.com
2003-02-22 18:00:34 +01:00
parent 55ae7d26f6
commit e7715445f3
2 changed files with 8 additions and 4 deletions

View File

@ -153,10 +153,13 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
{
switch(mode) {
case RFIRST:
err=keyname ?
table->file->index_first(table->record[0]) :
table->file->rnd_init(1) ||
table->file->rnd_next(table->record[0]);
if (keyname)
err=table->file->index_first(table->record[0]);
else
{
if (!(err=table->file->rnd_init(1)))
err=table->file->rnd_next(table->record[0]);
}
mode=RNEXT;
break;
case RLAST: