Commit 7ca80b6b authored by Sergey Glukhov's avatar Sergey Glukhov

5.0-bugteam->5.1-bugteam merge

parents 047d12d7 d6ee44b0
......@@ -720,3 +720,11 @@ connection con1;
drop table t1;
disconnect con1;
connection default;
#
# Bug#44151 using handler commands on information_schema tables crashes server
#
USE information_schema;
--error ER_WRONG_USAGE
HANDLER COLUMNS OPEN;
USE test;
......@@ -739,3 +739,7 @@ handler t1 read a next;
ERROR HY000: Table storage engine for 't1' doesn't have this option
handler t1 close;
drop table t1;
USE information_schema;
HANDLER COLUMNS OPEN;
ERROR HY000: Incorrect usage of HANDLER OPEN and information_schema
USE test;
......@@ -737,3 +737,7 @@ handler t1 read a next;
ERROR HY000: Table storage engine for 't1' doesn't have this option
handler t1 close;
drop table t1;
USE information_schema;
HANDLER COLUMNS OPEN;
ERROR HY000: Incorrect usage of HANDLER OPEN and information_schema
USE test;
......@@ -199,6 +199,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))
{
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment