diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2009-04-17 12:41:15 +0500 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2009-04-17 12:41:15 +0500 |
commit | ff923cc82d23f9806834a2411150e32d30b9f4d9 (patch) | |
tree | baa3d0aa922d5d8c2112b040dcb6ad8f98bbd144 /sql/sql_handler.cc | |
parent | 5b05d360b0003de4aaa8b0e88d7a70d5c70dfb72 (diff) | |
download | mariadb-git-ff923cc82d23f9806834a2411150e32d30b9f4d9.tar.gz |
Bug#44151 using handler commands on information_schema tables crashes server
information schema tables are based on internal tmp tables which are removed
after each statement execution. So HANDLER comands can not be used with
information schema.
mysql-test/r/handler.result:
test result
mysql-test/t/handler.test:
test case
sql/sql_handler.cc:
information schema tables are based on internal tmp tables which are removed
after each statement execution. So HANDLER comands can not be used with
information schema.
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r-- | sql/sql_handler.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index c376f1b3d1d..721b365a7b9 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -190,6 +190,14 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen) tables->db, tables->table_name, tables->alias, (int) reopen)); + if (tables->schema_table) + { + my_error(ER_WRONG_USAGE, MYF(0), "HANDLER OPEN", + INFORMATION_SCHEMA_NAME.str); + DBUG_PRINT("exit",("ERROR")); + DBUG_RETURN(TRUE); + } + if (! hash_inited(&thd->handler_tables_hash)) { /* |