summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2016-02-05 17:46:01 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2016-02-05 17:46:01 +0100
commit6ecf6d8453182ff8c862956a98b822261a8821f9 (patch)
tree7ba2041784513587f95716a7866487a5b76641e3 /mysql-test/t
parent9f3b53fb4a32c9bd6f7dca013a841d4bc86d038f (diff)
downloadmariadb-git-6ecf6d8453182ff8c862956a98b822261a8821f9.tar.gz
MDEV-7827: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed in Field_long::val_str on EXPLAIN EXTENDED
(Solution by Sergei Petrunia) It appeared that semijoin conditions was not iterated when we were updating used tables. So now they do.
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/derived.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test
index ddce7f55292..e31ece80e90 100644
--- a/mysql-test/t/derived.test
+++ b/mysql-test/t/derived.test
@@ -506,3 +506,25 @@ select x.id, message from (select id from t1) x left join
(select id, 1 as message from t2) y on x.id=y.id
where coalesce(message,0) <> 0;
drop table t1,t2;
+
+--echo #
+--echo # MDEV-7827: Assertion `!table || (!table->read_set ||
+--echo # bitmap_is_set(table->read_set, field_index))' failed
+--echo # in Field_long::val_str on EXPLAIN EXTENDED
+--echo #
+
+CREATE TABLE t1 (f1 INT, f2 INT, KEY(f2)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (6,9);
+
+CREATE TABLE t2 (f3 INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (2),(0);
+
+EXPLAIN EXTENDED
+SELECT f1 FROM ( SELECT * FROM t1 ) AS sq
+WHERE f1 IN (
+ SELECT f3 FROM t2 WHERE f2 IN (
+ SELECT f3 FROM t2 HAVING f3 >= 8
+ )
+);
+
+DROP TABLE t2,t1;