summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2019-05-19 11:44:34 -0700
committerIgor Babaev <igor@askmonty.org>2019-05-19 11:44:34 -0700
commit2c9844a438c5f0bddcb037a1e05978118f48abb6 (patch)
treece88808b2366acaca6e1f9c5741da324796ba03a /mysql-test/r
parent5543b75550962f07b4adcd47a6e52accec0a7d0f (diff)
downloadmariadb-git-2c9844a438c5f0bddcb037a1e05978118f48abb6.tar.gz
MDEV-18896 Crash in convert_join_subqueries_to_semijoins : Correction
This patch complements the original patch for MDEV-18896 that prevents conversions to semi-joins in tableless selects used in INSERT statements in post-5.5 versions of the server. The test case was corrected as well to ensure that potential conversion to jtbm semi-joins is also checked (the problem was that one of the preceeding testcases in subselect_sj.test did not restore the state of the optimizer switch leaving the 'materialization' in the state 'off' and so blocking this check). Noticed an inconsistency in the state of select_lex::table_list used in INSERT statements and left a comment about this.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/subselect_sj.result1
-rw-r--r--mysql-test/r/subselect_sj_jcl6.result1
2 files changed, 2 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result
index 73c620b2973..d0b8b626ba2 100644
--- a/mysql-test/r/subselect_sj.result
+++ b/mysql-test/r/subselect_sj.result
@@ -3181,6 +3181,7 @@ drop table t1,t2,t3;
#
# MDEV-18896: IN subquery in WHERE of a table-less query used for INSERT
#
+set @@optimizer_switch= @subselect_sj_tmp;
create table t1 (a1 varchar(25));
create table t2 (a2 varchar(25)) ;
insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2);
diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result
index 03cf368f32c..e9a8b7301f7 100644
--- a/mysql-test/r/subselect_sj_jcl6.result
+++ b/mysql-test/r/subselect_sj_jcl6.result
@@ -3195,6 +3195,7 @@ drop table t1,t2,t3;
#
# MDEV-18896: IN subquery in WHERE of a table-less query used for INSERT
#
+set @@optimizer_switch= @subselect_sj_tmp;
create table t1 (a1 varchar(25));
create table t2 (a2 varchar(25)) ;
insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2);