mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge branch '10.4' into 10.5
This commit is contained in:
@ -624,6 +624,25 @@ select * from t1 force index(k1) where f2 <= 5 and pk2 <=5 and pk1 = 'abc' and
|
||||
drop table t1;
|
||||
|
||||
SET optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-11172: EXPLAIN shows non-sensical value for key_len with type=index
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
|
||||
CREATE TABLE t2 (
|
||||
pk VARCHAR(50),
|
||||
a VARCHAR(20),
|
||||
KEY k1(a),
|
||||
PRIMARY KEY(pk)
|
||||
)ENGINE=INNODB;
|
||||
|
||||
INSERT INTO t2 SELECT a,a FROM t1;
|
||||
EXPLAIN SELECT pk FROM t2 FORCE INDEX(k1);
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
set global innodb_stats_persistent= @innodb_stats_persistent_save;
|
||||
set global innodb_stats_persistent_sample_pages=
|
||||
@innodb_stats_persistent_sample_pages_save;
|
||||
set global innodb_stats_persistent_sample_pages= @innodb_stats_persistent_sample_pages_save;
|
||||
|
Reference in New Issue
Block a user