MDEV-14056 DROP TEMPORARY TABLE IF EXISTS causes error 1290 with read_only option

if it's a DROP TABLE, we cannot detect whether a table is
temporary by looking in thd->temporary_tables - because the
table might simply not exist at all.
This commit is contained in:
Sergei Golubchik 2017-10-14 15:59:54 +02:00
commit 19a702a85c
3 changed files with 24 additions and 25 deletions

View file

@ -47,6 +47,9 @@ delete t1 from t1,t3 where t1.a=t3.a;
drop table t1;
insert into t1 values(1);
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
drop temporary table if exists t1;
Warnings:
Note 1051 Unknown table 't1'
connection default;
set global read_only=0;
lock table t1 write;