diff options
author | Igor Babaev <igor@askmonty.org> | 2011-02-07 15:19:03 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-02-07 15:19:03 -0800 |
commit | 6c7360b540315a85ed6011dd4b31471c345e886a (patch) | |
tree | 62687190744e9d10a9a9fcaaccaf79166d962f47 /mysql-test/r/view.result | |
parent | 7e206872128d891fffa5238c093c8d6506da8dbb (diff) | |
parent | cbeab25085401f55a4536cba98074a0fd3e58bc7 (diff) | |
download | mariadb-git-6c7360b540315a85ed6011dd4b31471c345e886a.tar.gz |
Merge
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r-- | mysql-test/r/view.result | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 1648043b3fb..3037ef4942f 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3939,3 +3939,23 @@ Handler_read_rnd 0 Handler_read_rnd_next 17 DROP VIEW v; DROP TABLE t1, t2; +# +# Bug#702403: crash with multiple equalities and a view +# +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (10); +CREATE TABLE t2 (pk int PRIMARY KEY, b int, INDEX idx (b)); +INSERT INTO t2 VALUES (1,2), (3,4); +CREATE TABLE t3 (pk int PRIMARY KEY, b int, INDEX idx (b)); +INSERT INTO t3 VALUES (1,2), (3,4); +CREATE VIEW v1 AS SELECT * FROM t1; +EXPLAIN +SELECT * FROM v1, t2, t3 +WHERE t3.pk = v1.a AND t2.b = 1 AND t2.b = t3.pk AND v1.a BETWEEN 2 AND 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +SELECT * FROM v1, t2, t3 +WHERE t3.pk = v1.a AND t2.b = 1 AND t2.b = t3.pk AND v1.a BETWEEN 2 AND 5; +a pk b pk b +DROP VIEW v1; +DROP TABLE t1, t2, t3; |