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

Fix for error message when using HANDLER OPEN on InnoDB tables.

This commit is contained in:
monty@hundin.mysql.fi
2001-12-22 15:44:44 +02:00
parent 9e9e765fbd
commit 3eda53fb34
4 changed files with 19 additions and 8 deletions

View File

@ -58,6 +58,7 @@ int mysql_ha_open(THD *thd, TABLE_LIST *tables)
if (!(tables->table->file->option_flag() & HA_CAN_SQL_HANDLER))
{
my_printf_error(ER_ILLEGAL_HA,ER(ER_ILLEGAL_HA),MYF(0), tables->name);
mysql_ha_close(thd, tables,1);
return -1;
}
@ -65,7 +66,7 @@ int mysql_ha_open(THD *thd, TABLE_LIST *tables)
return 0;
}
int mysql_ha_close(THD *thd, TABLE_LIST *tables)
int mysql_ha_close(THD *thd, TABLE_LIST *tables, bool dont_send_ok)
{
TABLE **ptr=find_table_ptr_by_name(thd, tables->db, tables->name);
@ -75,8 +76,8 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables)
close_thread_table(thd, ptr);
VOID(pthread_mutex_unlock(&LOCK_open));
}
send_ok(&thd->net);
if (!dont_send_ok)
send_ok(&thd->net);
return 0;
}