diff --git a/mysql-test/main/global_temporary_table.result b/mysql-test/main/global_temporary_table.result index 2fcbaccec1047..3e27eef5d784c 100644 --- a/mysql-test/main/global_temporary_table.result +++ b/mysql-test/main/global_temporary_table.result @@ -1008,6 +1008,7 @@ set max_session_mem_used= 8192; insert t values (0); ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement lock table t write; +ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement alter table t add z int; ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement set max_session_mem_used= default; diff --git a/mysql-test/main/global_temporary_table.test b/mysql-test/main/global_temporary_table.test index 96d3aa6fe1ed2..97f3029b4cb6c 100644 --- a/mysql-test/main/global_temporary_table.test +++ b/mysql-test/main/global_temporary_table.test @@ -877,6 +877,7 @@ create global temporary table t (t text); set max_session_mem_used= 8192; --error ER_OPTION_PREVENTS_STATEMENT insert t values (0); +--error ER_OPTION_PREVENTS_STATEMENT lock table t write; --error ER_OPTION_PREVENTS_STATEMENT alter table t add z int; diff --git a/mysql-test/suite/binlog/r/global_temporary_table.result b/mysql-test/suite/binlog/r/global_temporary_table.result index 5b50d474c5de6..59536715a9124 100644 --- a/mysql-test/suite/binlog/r/global_temporary_table.result +++ b/mysql-test/suite/binlog/r/global_temporary_table.result @@ -1011,6 +1011,7 @@ set max_session_mem_used= 8192; insert t values (0); ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement lock table t write; +ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement alter table t add z int; ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement set max_session_mem_used= default; diff --git a/mysql-test/suite/rpl/r/global_temporary_table.result b/mysql-test/suite/rpl/r/global_temporary_table.result index 084c1be619dd9..dd322a4a47b1d 100644 --- a/mysql-test/suite/rpl/r/global_temporary_table.result +++ b/mysql-test/suite/rpl/r/global_temporary_table.result @@ -1011,6 +1011,7 @@ set max_session_mem_used= 8192; insert t values (0); ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement lock table t write; +ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement alter table t add z int; ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement set max_session_mem_used= default; diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 1360ea369fc6f..ffb1ceffd15b5 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2672,7 +2672,7 @@ Locked_tables_list::init_locked_tables(THD *thd) &db.str, (size_t) db.length + 1, &table_name.str, (size_t) table_name.length + 1, &alias.str, (size_t) alias.length + 1, - NullS)) + NullS) || thd->killed) { reset(); return TRUE;