diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2021-04-23 16:00:29 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2021-04-23 19:02:38 +0300 |
commit | 55491d94a6c0d61f9db9ef5bb7950e2417411633 (patch) | |
tree | 85b6b315120dd9946106541a280b8b9d9b5dc5a1 /sql/sql_prepare.cc | |
parent | 75c01f39b1b4a6d27d36d075f8baab9bdda7cc7e (diff) | |
download | mariadb-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_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 9775e99afdd..357c1334ee2 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1452,7 +1452,7 @@ static int mysql_test_update(Prepared_statement *stmt, } /* - thd->fill_derived_tables() is false here for sure (because it is + thd->fill_derived_table(table_list) is false here for sure (because it is preparation of PS, so we even do not check it). */ if (table_list->handle_derived(thd->lex, DT_MERGE_FOR_INSERT)) |