Skip to content

Commit 09518a3

Browse files
author
Chandan Kunal
committed
Bug #31472704 : MYSQL CRASHES ON SOME QUERIES WITH SUBSELECTS
Description: Fix an issue with SELECT query. Change-Id: I90a256bf237f1ce7860b1b3cfb25813287036607
1 parent 9442668 commit 09518a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sql/item.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -3005,7 +3005,8 @@ void Item_ident::fix_after_pullout(st_select_lex *parent_select,
30053005
The subquery on this level is outer-correlated with respect to the field
30063006
*/
30073007
Item_subselect *subq_predicate= child_select->master_unit()->item;
3008-
3008+
if (subq_predicate == NULL)
3009+
return;
30093010
subq_predicate->used_tables_cache|= OUTER_REF_TABLE_BIT;
30103011
child_select= child_select->outer_select();
30113012
}

0 commit comments

Comments
 (0)