diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2017-02-28 17:39:28 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2017-02-28 20:52:26 +0100 |
commit | 75f6067e89d7a777e7c1a1580a833aacc501d290 (patch) | |
tree | 4127227514ffca156423953a9897d3222dab9db4 /mysql-test/t/subselect_innodb.test | |
parent | 5a0fff50f87e20c4e95a84143a0a3bb67e03e29e (diff) | |
download | mariadb-git-75f6067e89d7a777e7c1a1580a833aacc501d290.tar.gz |
MDEV-9635: Server crashes in part_of_refkey or assertion `!created && key_to_save < (int)s->keys' failed in TABLE::use_index(int) or with join_cache_level>2
Do not try to create index where ref is for hash join.
Diffstat (limited to 'mysql-test/t/subselect_innodb.test')
-rw-r--r-- | mysql-test/t/subselect_innodb.test | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/subselect_innodb.test b/mysql-test/t/subselect_innodb.test index bcd95e02180..d764c435c82 100644 --- a/mysql-test/t/subselect_innodb.test +++ b/mysql-test/t/subselect_innodb.test @@ -433,3 +433,23 @@ drop table t1; set optimizer_switch=@subselect_innodb_tmp; + +--echo # +--echo # MDEV-9635:Server crashes in part_of_refkey or assertion +--echo # `!created && key_to_save < (int)s->keys' failed in +--echo # TABLE::use_index(int) or with join_cache_level>2 +--echo # + +SET join_cache_level=3; + +CREATE TABLE t1 (f1 VARCHAR(1024)) ENGINE=InnoDB; +CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; + +CREATE TABLE t2 (f2 VARCHAR(4)) ENGINE=InnoDB; +INSERT INTO t2 VALUES ('foo'),('bar'); + +SELECT * FROM v1, t2 WHERE ( f1, f2 ) IN ( SELECT f1, f1 FROM t1 ); + +set join_cache_level = default; +drop view v1; +drop table t1,t2; |