diff options
author | unknown <monty@hundin.mysql.fi> | 2001-12-22 15:44:44 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-12-22 15:44:44 +0200 |
commit | b24d5e4ef0c1806998a858eb122b556dc1cd36de (patch) | |
tree | 786efd7b64be9ee4f055f52dc40616496719a65b /sql/sql_handler.cc | |
parent | 6844ecca88496d29ace4b26dedb574825af89363 (diff) | |
download | mariadb-git-b24d5e4ef0c1806998a858eb122b556dc1cd36de.tar.gz |
Fix for error message when using HANDLER OPEN on InnoDB tables.
mysql-test/r/innodb.result:
Test that handler doesn't work with InnoDB
mysql-test/t/innodb.test:
Test that handler doesn't work with InnoDB
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r-- | sql/sql_handler.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 5d913d2b828..24108330dc9 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -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; } |