mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.5 into 10.6
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_sequence.inc
|
||||
|
||||
SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent;
|
||||
SET GLOBAL innodb_stats_persistent=OFF;
|
||||
@ -6,11 +7,6 @@ SET GLOBAL innodb_stats_persistent=OFF;
|
||||
--echo #
|
||||
--echo # MDEV-6402: Optimizer doesn't choose best execution plan when composite key is used
|
||||
--echo #
|
||||
create table t0(a int);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
|
||||
create table t1(a int);
|
||||
insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
pk1 int(11) NOT NULL,
|
||||
@ -24,13 +20,13 @@ CREATE TABLE t2 (
|
||||
|
||||
insert into t2
|
||||
select
|
||||
round(log(2,t1.a+1)),
|
||||
t1.a,
|
||||
t1.a,
|
||||
round(log(2,seq+1)),
|
||||
seq,
|
||||
seq,
|
||||
REPEAT('filler-data-', 10),
|
||||
REPEAT('filler-data-', 10)
|
||||
from
|
||||
t1;
|
||||
seq_0_to_1999;
|
||||
|
||||
select pk1, count(*) from t2 group by pk1;
|
||||
|
||||
@ -39,7 +35,7 @@ EXPLAIN SELECT * FROM t2 USE INDEX(ux_pk1_fd5) WHERE pk1=9 AND fd5 < 500 ORDER B
|
||||
--echo # This also must use range, not ref. key_len must be 13
|
||||
EXPLAIN SELECT * FROM t2 WHERE pk1=9 AND fd5 < 500 ORDER BY fd5 DESC LIMIT 10;
|
||||
|
||||
drop table t0,t1, t2;
|
||||
drop table t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-6814: Server crashes in calculate_key_len on query with ORDER BY
|
||||
|
Reference in New Issue
Block a user