summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2021-04-23 16:00:29 +0300
committerSergei Petrunia <psergey@askmonty.org>2021-04-23 19:02:38 +0300
commit55491d94a6c0d61f9db9ef5bb7950e2417411633 (patch)
tree85b6b315120dd9946106541a280b8b9d9b5dc5a1 /sql/sql_base.cc
parent75c01f39b1b4a6d27d36d075f8baab9bdda7cc7e (diff)
downloadmariadb-git-bb-10.3-mdev21603.tar.gz
MDEV-21603: Long WHERE IN mariadb 10.3.22 crashbb-10.3-mdev21603
I_S tables and SHOW COMMANDS use special logic for creating and populating temp.tables, e.g. table creation is delayed. The code attempted to apply the same logic for the IN-to-SELECT temptable, which resulted in an attempt to read from not-yet-created temptable and crash. Fix this by restricting use of I_S table logic only to I_S tables.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 0b17032da8f..4e5b32ce1e5 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -5187,7 +5187,6 @@ bool open_normal_and_derived_tables(THD *thd, TABLE_LIST *tables, uint flags,
uint counter;
MDL_savepoint mdl_savepoint= thd->mdl_context.mdl_savepoint();
DBUG_ENTER("open_normal_and_derived_tables");
- DBUG_ASSERT(!thd->fill_derived_tables());
if (open_tables(thd, &tables, &counter, flags, &prelocking_strategy) ||
mysql_handle_derived(thd->lex, dt_phases))
goto end;