mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge branch '10.2' into 10.3
This commit is contained in:
@ -606,3 +606,22 @@ explain format= json
|
||||
select * from t1 force index(k1) where f2 <= 5 and pk2 <=5 and pk1 = 'abc' and f1 <= '3';
|
||||
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;
|
||||
|
Reference in New Issue
Block a user