diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-01 18:15:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-01 18:15:00 +0000 |
commit | a2a2e32c02643a0cec111511220227703fda1cd5 (patch) | |
tree | 69cc2b631234c2a8e026b9cd4d72676c61c594df /mysql-test/main/myisam.result | |
parent | Releasing progress-linux version 1:10.11.8-1~progress7.99u1. (diff) | |
download | mariadb-a2a2e32c02643a0cec111511220227703fda1cd5.tar.xz mariadb-a2a2e32c02643a0cec111511220227703fda1cd5.zip |
Merging upstream version 1:11.4.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/myisam.result')
-rw-r--r-- | mysql-test/main/myisam.result | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/mysql-test/main/myisam.result b/mysql-test/main/myisam.result index 7d930f1a..dbe9a32a 100644 --- a/mysql-test/main/myisam.result +++ b/mysql-test/main/myisam.result @@ -347,11 +347,11 @@ t1 1 c_2 2 a A 5 NULL NULL BTREE NO explain select * from t1,t2 where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL a NULL NULL NULL 2 -1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t1 ref a a 4 test.t2.a 3 explain select * from t1,t2 force index(a) where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL a NULL NULL NULL 2 -1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t1 ref a a 4 test.t2.a 3 explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL a NULL NULL NULL 2 @@ -387,10 +387,10 @@ t1 1 c_2 2 a A 5 NULL NULL BTREE NO explain select * from t1,t2 force index(c) where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 2 -1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t1 ref a a 4 test.t2.a 3 explain select * from t1 where a=0 or a=2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where +1 SIMPLE t1 range a a 4 NULL 5 Using index condition explain select * from t1 force index (a) where a=0 or a=2; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range a a 4 NULL 5 Using index condition @@ -643,6 +643,13 @@ id select_type table type possible_keys key key_len ref rows Extra select count(*) from t1 where a is null; count(*) 2 +insert into t1 values (1,''), (2,''); +explain select count(*) from t1 where a is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx idx 4 const 2 Using where +set statement optimizer_scan_setup_cost= 0 for explain select count(*) from t1 where a is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL idx NULL NULL NULL 4 Using where drop table t1; create table t1 (c1 int, c2 varchar(4) not null default '', key(c2(3))) default charset=utf8; @@ -2531,6 +2538,7 @@ DROP TABLE t1, t2, t3; # # BUG#51307 - widespread corruption with partitions and insert...select # +call mtr.add_suppression("Enabling keys got errno 12 on test.t1, retrying"); CREATE TABLE t1(a CHAR(255), KEY(a)); SELECT * FROM t1, t1 AS a1; a a @@ -2806,3 +2814,44 @@ drop table t; # # End of 10.8 tests # +CREATE TABLE t1 (pk INT, a INT, PRIMARY KEY(pk), KEY(a)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,NULL),(2,NULL),(3,1),(4,5); +SET @save_optimizer_switch= @@optimizer_switch; +SET optimizer_switch='index_merge_sort_intersection=on'; +SELECT pk FROM t1 WHERE pk > 2 AND a IS NULL; +pk +SET @@optimizer_switch= @save_optimizer_switch; +drop table t1; +# +# MDEV-30104 Server crashes in handler_rowid_filter_check upon ANALYZE TABLE +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1),(2); +CREATE TABLE t3 (c INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (1),(2); +CREATE TABLE t4 (pk INT, f CHAR(8), PRIMARY KEY(pk), KEY(f)) ENGINE=MyISAM; +INSERT INTO t4 VALUES (1,'o'),(2,'x'); +ANALYZE TABLE t1, t2, t3, t4 PERSISTENT FOR ALL; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +test.t4 analyze status Engine-independent statistics collected +test.t4 analyze status OK +SELECT * FROM t1 LEFT JOIN (t2 JOIN t3 ON 1) ON 2 IN (SELECT pk FROM t4 WHERE f < 's'); +a b c +1 NULL NULL +2 NULL NULL +ANALYZE TABLE t4 PERSISTENT FOR ALL; +Table Op Msg_type Msg_text +test.t4 analyze status Engine-independent statistics collected +test.t4 analyze status Table is already up to date +DROP TABLE t1, t2, t3, t4; +# +# End of 11.0 tests +# |