diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2015-10-22 13:57:44 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2015-10-28 09:34:05 +0100 |
commit | ce1b450ab1b75b3c469b8c490e40226973fdad17 (patch) | |
tree | ba4a4db4b94eb4cfdd1ca48f4924596469cd5a2c /mysql-test/r/subselect.result | |
parent | e1ed331ceabbf51b3409529ec78039c42324e1b0 (diff) | |
download | mariadb-git-ce1b450ab1b75b3c469b8c490e40226973fdad17.tar.gz |
MDEV-7930 Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed in handler::ha_index_read_map
In optimizing aggregate function do not try to touch tables from outer
query.
Diffstat (limited to 'mysql-test/r/subselect.result')
-rw-r--r-- | mysql-test/r/subselect.result | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 87492babe01..f49a9bc4aa0 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -7085,3 +7085,27 @@ sq NULL deallocate prepare stmt; drop table t1,t2,t3,t4; +# +# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE || +# m_lock_type != 2' failed in handler::ha_index_read_map +# +CREATE TABLE t1 (f1 INT); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (f2 INT, KEY(f2)); +INSERT INTO t2 VALUES (3); +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +sq +3 +SELECT * FROM v2 where ( SELECT MIN(v2.f2) FROM t1 ) > 0; +f2 +3 +SELECT count(*) FROM v2 group by ( SELECT MIN(v2.f2) FROM t1 ); +count(*) +1 +delete from t1; +SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; +sq +NULL +drop view v2; +drop table t1,t2; |