Commit 95cba104 authored by Sergey Petrunya's avatar Sergey Petrunya

BUG#751484: Valgrind warning / sporadic crash in evaluate_join_record...

BUG#751484: Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin
- Added testcase. The bug is most likely fixed by MWL#90 code.
parent 5ce5e8db
...@@ -1326,4 +1326,36 @@ x ...@@ -1326,4 +1326,36 @@ x
m m
c c
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
#
# BUG#751484: Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin
#
CREATE TABLE t1 ( f10 int, f11 int, KEY (f10));
INSERT IGNORE INTO t1 VALUES (0, 0),(0, 0);
CREATE TABLE t3 ( f10 int);
INSERT IGNORE INTO t3 VALUES (0);
set @tmp_751484= @@optimizer_switch;
set optimizer_switch='materialization=on';
SELECT * FROM t1
WHERE f11 IN (
SELECT C_SQ1_alias1.f11
FROM t1 AS C_SQ1_alias1
JOIN t3 AS C_SQ1_alias2
ON C_SQ1_alias2.f10 = C_SQ1_alias1.f10
);
f10 f11
0 0
0 0
set optimizer_switch='materialization=off';
SELECT * FROM t1
WHERE f11 IN (
SELECT C_SQ1_alias1.f11
FROM t1 AS C_SQ1_alias1
JOIN t3 AS C_SQ1_alias2
ON C_SQ1_alias2.f10 = C_SQ1_alias1.f10
);
f10 f11
0 0
0 0
set optimizer_switch=@tmp_751484;
drop table t1, t3;
set @@optimizer_switch=@save_optimizer_switch; set @@optimizer_switch=@save_optimizer_switch;
...@@ -1334,6 +1334,38 @@ x ...@@ -1334,6 +1334,38 @@ x
m m
c c
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
#
# BUG#751484: Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin
#
CREATE TABLE t1 ( f10 int, f11 int, KEY (f10));
INSERT IGNORE INTO t1 VALUES (0, 0),(0, 0);
CREATE TABLE t3 ( f10 int);
INSERT IGNORE INTO t3 VALUES (0);
set @tmp_751484= @@optimizer_switch;
set optimizer_switch='materialization=on';
SELECT * FROM t1
WHERE f11 IN (
SELECT C_SQ1_alias1.f11
FROM t1 AS C_SQ1_alias1
JOIN t3 AS C_SQ1_alias2
ON C_SQ1_alias2.f10 = C_SQ1_alias1.f10
);
f10 f11
0 0
0 0
set optimizer_switch='materialization=off';
SELECT * FROM t1
WHERE f11 IN (
SELECT C_SQ1_alias1.f11
FROM t1 AS C_SQ1_alias1
JOIN t3 AS C_SQ1_alias2
ON C_SQ1_alias2.f10 = C_SQ1_alias1.f10
);
f10 f11
0 0
0 0
set optimizer_switch=@tmp_751484;
drop table t1, t3;
set @@optimizer_switch=@save_optimizer_switch; set @@optimizer_switch=@save_optimizer_switch;
# #
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off # BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off
......
...@@ -1212,5 +1212,35 @@ LEFT JOIN t2 JOIN t3 ON t3.f10 = t2.f10 ON t3.f11 != 0 ); ...@@ -1212,5 +1212,35 @@ LEFT JOIN t2 JOIN t3 ON t3.f10 = t2.f10 ON t3.f11 != 0 );
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
--echo #
--echo # BUG#751484: Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin
--echo #
CREATE TABLE t1 ( f10 int, f11 int, KEY (f10));
INSERT IGNORE INTO t1 VALUES (0, 0),(0, 0);
CREATE TABLE t3 ( f10 int);
INSERT IGNORE INTO t3 VALUES (0);
set @tmp_751484= @@optimizer_switch;
set optimizer_switch='materialization=on';
SELECT * FROM t1
WHERE f11 IN (
SELECT C_SQ1_alias1.f11
FROM t1 AS C_SQ1_alias1
JOIN t3 AS C_SQ1_alias2
ON C_SQ1_alias2.f10 = C_SQ1_alias1.f10
);
set optimizer_switch='materialization=off';
SELECT * FROM t1
WHERE f11 IN (
SELECT C_SQ1_alias1.f11
FROM t1 AS C_SQ1_alias1
JOIN t3 AS C_SQ1_alias2
ON C_SQ1_alias2.f10 = C_SQ1_alias1.f10
);
set optimizer_switch=@tmp_751484;
drop table t1, t3;
# The following command must be the last one the file # The following command must be the last one the file
set @@optimizer_switch=@save_optimizer_switch; set @@optimizer_switch=@save_optimizer_switch;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment