mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '10.4' into 10.5
This commit is contained in:
@ -156,7 +156,7 @@ INSERT INTO t1 VALUES
|
||||
|
||||
# Execute select with invalid timestamp, desc ordering
|
||||
SELECT *
|
||||
FROM t1
|
||||
FROM t1 FORCE INDEX(PRIMARY)
|
||||
WHERE ts BETWEEN '0000-00-00' AND '2010-00-01 00:00:00'
|
||||
ORDER BY ts DESC
|
||||
LIMIT 2;
|
||||
@ -167,7 +167,7 @@ ts c
|
||||
# Should use index condition
|
||||
EXPLAIN
|
||||
SELECT *
|
||||
FROM t1
|
||||
FROM t1 FORCE INDEX(PRIMARY)
|
||||
WHERE ts BETWEEN '0000-00-00' AND '2010-00-01 00:00:00'
|
||||
ORDER BY ts DESC
|
||||
LIMIT 2;
|
||||
@ -429,6 +429,12 @@ CREATE TABLE t2 (pk INTEGER PRIMARY KEY, i INTEGER NOT NULL);
|
||||
INSERT INTO t2 VALUES (11,1);
|
||||
INSERT INTO t2 VALUES (12,2);
|
||||
INSERT INTO t2 VALUES (15,4);
|
||||
analyze table t1,t2 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
|
||||
set @save_optimizer_switch= @@optimizer_switch;
|
||||
set optimizer_switch='semijoin=off';
|
||||
EXPLAIN
|
||||
@ -687,6 +693,12 @@ CREATE TABLE t2 (a varchar(1024), KEY (a(512)));
|
||||
INSERT INTO t2 VALUES
|
||||
('Ill'), ('eckqzsflbzaffti'), ('w'), ('she'), ('gxbwypqtjzwywwer'), ('w');
|
||||
insert into t2 select seq from seq_1_to_100;
|
||||
analyze table t1,t2 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
|
||||
SET SESSION optimizer_switch='index_condition_pushdown=off';
|
||||
EXPLAIN
|
||||
SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0)
|
||||
|
Reference in New Issue
Block a user