diff options
author | unknown <sanja@askmonty.org> | 2013-09-26 21:20:15 +0300 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2013-09-26 21:20:15 +0300 |
commit | e5746665c9f8dcfa66a7a645f1c5517769a2fa0a (patch) | |
tree | 56e9d83b5ef43f93d9628c25f69b81f174d48f5c /mysql-test | |
parent | 828be0d9bae813d0587fbede6e02b12eebac66ca (diff) | |
parent | 9d83468e78ba23f024ce3c11443913ad75cf1ea5 (diff) | |
download | mariadb-git-e5746665c9f8dcfa66a7a645f1c5517769a2fa0a.tar.gz |
merge 10.0-base -> 10.0
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/innodb_mrr_cpk.result | 23 | ||||
-rw-r--r-- | mysql-test/r/mysqlslap.result | 4 | ||||
-rw-r--r-- | mysql-test/t/innodb_mrr_cpk.test | 27 | ||||
-rw-r--r-- | mysql-test/t/mysqlslap.test | 7 |
4 files changed, 61 insertions, 0 deletions
diff --git a/mysql-test/r/innodb_mrr_cpk.result b/mysql-test/r/innodb_mrr_cpk.result index 15ef32447a8..bcee428bc57 100644 --- a/mysql-test/r/innodb_mrr_cpk.result +++ b/mysql-test/r/innodb_mrr_cpk.result @@ -171,3 +171,26 @@ a b c d e g 2 6 two 12 2 6 DROP TABLE t1, t2; set optimizer_switch=@tmp_mdev3817; +# +# MDEV-5037: Server crash on a JOIN on a derived table with join_cache_level > 2 +# +create table t0 (a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +CREATE TABLE t1 ( +id char(8) CHARACTER SET utf8 NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE t2 ( +id char(8) CHARACTER SET utf8 DEFAULT NULL, +url text CHARACTER SET utf8 +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +insert into t1 select '03b2ca8c' from t0 A, t0 B limit 80; +insert into t2 select '03b2ca8c','' from t0 A, t0 B, t0 C; +set @tmp_mdev5037=@@join_cache_level; +set join_cache_level=3; +explain SELECT 1 FROM (SELECT url, id FROM t2 LIMIT 1 OFFSET 20) derived RIGHT JOIN t1 ON t1.id = derived.id; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL # +1 PRIMARY <derived2> hash_ALL key0 #hash#key0 25 test.t1.id # Using join buffer (flat, BNLH join) +2 DERIVED t2 ALL NULL NULL NULL NULL # +set join_cache_level= @tmp_mdev5037; +drop table t0,t1,t2; diff --git a/mysql-test/r/mysqlslap.result b/mysql-test/r/mysqlslap.result index 38a7b0a694e..d3c5107dee3 100644 --- a/mysql-test/r/mysqlslap.result +++ b/mysql-test/r/mysqlslap.result @@ -251,3 +251,7 @@ Benchmark Number of clients running queries: 1 Average number of queries per client: 0 +# +# MDEV-4684 - Enhancement request: --init-command support for mysqlslap +# +DROP TABLE t1; diff --git a/mysql-test/t/innodb_mrr_cpk.test b/mysql-test/t/innodb_mrr_cpk.test index a7b2d9c0ddd..bee8d5796ce 100644 --- a/mysql-test/t/innodb_mrr_cpk.test +++ b/mysql-test/t/innodb_mrr_cpk.test @@ -165,3 +165,30 @@ SELECT * FROM t1, t2 WHERE g = b AND ( a < 7 OR a > e ); DROP TABLE t1, t2; set optimizer_switch=@tmp_mdev3817; +--echo # +--echo # MDEV-5037: Server crash on a JOIN on a derived table with join_cache_level > 2 +--echo # +create table t0 (a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +CREATE TABLE t1 ( + id char(8) CHARACTER SET utf8 NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE TABLE t2 ( + id char(8) CHARACTER SET utf8 DEFAULT NULL, + url text CHARACTER SET utf8 +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +insert into t1 select '03b2ca8c' from t0 A, t0 B limit 80; +insert into t2 select '03b2ca8c','' from t0 A, t0 B, t0 C; + +set @tmp_mdev5037=@@join_cache_level; +set join_cache_level=3; + +--replace_column 9 # +explain SELECT 1 FROM (SELECT url, id FROM t2 LIMIT 1 OFFSET 20) derived RIGHT JOIN t1 ON t1.id = derived.id; + +set join_cache_level= @tmp_mdev5037; + +drop table t0,t1,t2; diff --git a/mysql-test/t/mysqlslap.test b/mysql-test/t/mysqlslap.test index 69eaae76409..c49c4ab3d7d 100644 --- a/mysql-test/t/mysqlslap.test +++ b/mysql-test/t/mysqlslap.test @@ -73,3 +73,10 @@ DROP DATABASE bug58090; --replace_regex /queries: [0-9]+.[0-9]+/queries: TIME/ --exec $MYSQL_SLAP + +--echo # +--echo # MDEV-4684 - Enhancement request: --init-command support for mysqlslap +--echo # + +--exec $MYSQL_SLAP --create-schema=test --init-command="CREATE TABLE t1(a INT)" --silent --concurrency=1 --iterations=1 +DROP TABLE t1; |