summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2019-01-24 20:47:46 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2019-01-24 20:47:46 +0530
commit036ca990abddbc9b93f45904ccabd5ec4bd5b396 (patch)
treebddbc693f6b7b3d02cb99ad63439519debcbe7c9 /sql/sql_lex.cc
parentedeba0c8733409865c3abcab881af0d48b7be94f (diff)
downloadmariadb-git-036ca990abddbc9b93f45904ccabd5ec4bd5b396.tar.gz
MDEV-18255: Server crashes in Bitmap<64u>::intersect
Calling st_select_lex::update_used_tables in JOIN::optimize_unflattened_subqueries only when we are sure that the join have not been cleaned up. This can happen for a case when we have a non-merged semi-join and an impossible where which would lead to the cleanup of the join which has the non-merged semi-join
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 08c169c5999..2fb239ed498 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -3551,7 +3551,8 @@ bool st_select_lex::optimize_unflattened_subqueries(bool const_only)
inner_join->select_options|= SELECT_DESCRIBE;
}
res= inner_join->optimize();
- sl->update_used_tables();
+ if (!inner_join->cleaned)
+ sl->update_used_tables();
sl->update_correlated_cache();
is_correlated_unit|= sl->is_correlated;
inner_join->select_options= save_options;