diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-04-21 13:13:19 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-04-21 13:13:19 +0200 |
commit | f2433b8dd3c10b1e26a6f0b98dfbaa45b22fe0af (patch) | |
tree | 05e2e452d6bcb96cfd2709abddb52719f5d25fff | |
parent | 9fffa9374cd2479d91d4989387c28eede5dff2d9 (diff) | |
download | mariadb-git-f2433b8dd3c10b1e26a6f0b98dfbaa45b22fe0af.tar.gz |
MDEV-10824 - Crash in CREATE OR REPLACE TABLE t1 AS SELECT spfunc()
followup for a3c980b381ea
same change in Locked_tables_list::unlink_from_list(), otherwise
thd->locked_tables_list will keep pointers to a free'd TABLE if
prelocked under lock tables.
This fixes a crash in main.create_or_replace on debug Win builds
after bcb36ee21e25
-rw-r--r-- | sql/sql_base.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 7d27e87180c..f7de4e4f3c2 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2872,7 +2872,8 @@ void Locked_tables_list::unlink_from_list(THD *thd, If mode is not LTM_LOCK_TABLES, we needn't do anything. Moreover, outside this mode pos_in_locked_tables value is not trustworthy. */ - if (thd->locked_tables_mode != LTM_LOCK_TABLES) + if (thd->locked_tables_mode != LTM_LOCK_TABLES && + thd->locked_tables_mode != LTM_PRELOCKED_UNDER_LOCK_TABLES) return; /* |