mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
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.
This commit is contained in:
@ -502,3 +502,7 @@ handler t1_alias READ a next where inexistent > 0;
|
|||||||
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
ERROR 42S22: Unknown column 'inexistent' in 'field list'
|
||||||
handler t1_alias close;
|
handler t1_alias close;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
USE information_schema;
|
||||||
|
HANDLER COLUMNS OPEN;
|
||||||
|
ERROR HY000: Incorrect usage of HANDLER OPEN and information_schema
|
||||||
|
USE test;
|
||||||
|
@ -460,3 +460,11 @@ handler t1_alias read a next;
|
|||||||
handler t1_alias READ a next where inexistent > 0;
|
handler t1_alias READ a next where inexistent > 0;
|
||||||
handler t1_alias close;
|
handler t1_alias close;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#44151 using handler commands on information_schema tables crashes server
|
||||||
|
#
|
||||||
|
USE information_schema;
|
||||||
|
--error ER_WRONG_USAGE
|
||||||
|
HANDLER COLUMNS OPEN;
|
||||||
|
USE test;
|
||||||
|
@ -190,6 +190,14 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen)
|
|||||||
tables->db, tables->table_name, tables->alias,
|
tables->db, tables->table_name, tables->alias,
|
||||||
(int) reopen));
|
(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))
|
if (! hash_inited(&thd->handler_tables_hash))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user