summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect_mat.result
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-01-27 17:35:26 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-01-27 17:35:26 +0400
commit53fde5bb6f98896c0ccd9b60a9576e5c5fef8a91 (patch)
tree76e44e4e12b595507bc04168461759a2d354113a /mysql-test/r/subselect_mat.result
parent8a8e5a50c9fd54f97e01099ff8b1e657932e80cd (diff)
downloadmariadb-git-53fde5bb6f98896c0ccd9b60a9576e5c5fef8a91.tar.gz
BUG#922254: Assertion `0' failed at item_cmpfunc.cc:5899: Item* Item_equal::get_first(JOIN_TAB*, Item*)
Fixed Item* Item_equal::get_first(JOIN_TAB *context, Item *field_item) to work correctly in the case where: - context!= NO_PARTICULAR_TAB, it points to a table within SJ-Materialization nest - field_item points to an item_equal that has a constant Item_field but does not have any fields from tables that are within semi-join nests.
Diffstat (limited to 'mysql-test/r/subselect_mat.result')
-rw-r--r--mysql-test/r/subselect_mat.result20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result
index 7225cf7c825..bb30bfaf7f1 100644
--- a/mysql-test/r/subselect_mat.result
+++ b/mysql-test/r/subselect_mat.result
@@ -1811,6 +1811,26 @@ a b c
4 4 2
4 4 4
DROP TABLE t1,t2;
+#
+# BUG#922254: Assertion `0' failed at item_cmpfunc.cc:5899: Item* Item_equal::get_first(JOIN_TAB*, Item*)
+#
+CREATE TABLE t1 ( a VARCHAR(3) );
+CREATE TABLE t2 ( b VARCHAR(3), c VARCHAR(8), KEY(c) );
+INSERT INTO t2 VALUES ('USA','Abilene'),('USA','Akron');
+EXPLAIN
+SELECT * FROM
+( SELECT * FROM t1 ) AS alias1,
+t2 AS alias2
+WHERE b = a AND a IN (
+SELECT alias3.c
+FROM t2 AS alias3, t2 AS alias4
+WHERE alias4.c = alias3.b
+);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+3 MATERIALIZED alias3 ALL NULL NULL NULL NULL 2
+3 MATERIALIZED alias4 index c c 11 NULL 2 Using where; Using index; Using join buffer (flat, BNL join)
+DROP TABLE t1,t2;
# This must be at the end:
set optimizer_switch=@subselect_sj_mat_tmp;
set join_cache_level=@save_join_cache_level;