summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorRex <rex.johnston@mariadb.com>2023-01-23 14:35:14 +1200
committerRex <rex.johnston@mariadb.com>2023-02-01 06:18:55 +1200
commit9739c26fec71b1118ccbf09a9b673a8d28b2110c (patch)
treea4dbf96cf32e9f556f550317a4c2e2f734a3317b /sql/sql_select.cc
parentc45630327c3477c24aea25692021bb7732e4a64a (diff)
downloadmariadb-git-bb-10.3-MDEV-28622.tar.gz
MDEV-28620, MDEV-28621, MDEV-28622 Server crash in /sql/item_subselect.cc *bb-10.3-MDEV-28622
Optimizer has eliminated subquery for various reasons. Attempting to walk or access Item_subselect (and descendents) values causes issues for these removed Items. Fixed by setting either fixed_const, null_value or checking eliminated.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 58d9b232722..7eb90fc789e 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -1198,7 +1198,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
*/
if (select_lex->master_unit()->item && // 1)
select_lex->first_cond_optimization && // 2)
- !thd->lex->is_view_context_analysis()) // 3)
+ !thd->lex->is_ps_or_view_context_analysis()) // 3)
{
remove_redundant_subquery_clauses(select_lex);
}