mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE
- Backport testcase from mysql-5.6
This commit is contained in:
parent
b95c8ce530
commit
7af71b74a9
3 changed files with 31 additions and 0 deletions
|
@ -2047,6 +2047,17 @@ f1 f2 f3 f4
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP VIEW v3;
|
DROP VIEW v3;
|
||||||
#
|
#
|
||||||
|
# BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY);
|
||||||
|
INSERT INTO t1 VALUES (1),(3),(5);
|
||||||
|
SELECT * FROM t1 WHERE pk <> 3 OR pk < 4;
|
||||||
|
pk
|
||||||
|
1
|
||||||
|
3
|
||||||
|
5
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
# MDEV-5606: range optimizer: "x < y" is sargable, while "y > x" is not
|
# MDEV-5606: range optimizer: "x < y" is sargable, while "y > x" is not
|
||||||
#
|
#
|
||||||
create table t1(a int);
|
create table t1(a int);
|
||||||
|
|
|
@ -2049,6 +2049,17 @@ f1 f2 f3 f4
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP VIEW v3;
|
DROP VIEW v3;
|
||||||
#
|
#
|
||||||
|
# BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY);
|
||||||
|
INSERT INTO t1 VALUES (1),(3),(5);
|
||||||
|
SELECT * FROM t1 WHERE pk <> 3 OR pk < 4;
|
||||||
|
pk
|
||||||
|
1
|
||||||
|
3
|
||||||
|
5
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
# MDEV-5606: range optimizer: "x < y" is sargable, while "y > x" is not
|
# MDEV-5606: range optimizer: "x < y" is sargable, while "y > x" is not
|
||||||
#
|
#
|
||||||
create table t1(a int);
|
create table t1(a int);
|
||||||
|
|
|
@ -1639,6 +1639,15 @@ SELECT * FROM v3;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP VIEW v3;
|
DROP VIEW v3;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY);
|
||||||
|
INSERT INTO t1 VALUES (1),(3),(5);
|
||||||
|
SELECT * FROM t1 WHERE pk <> 3 OR pk < 4;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-5606: range optimizer: "x < y" is sargable, while "y > x" is not
|
--echo # MDEV-5606: range optimizer: "x < y" is sargable, while "y > x" is not
|
||||||
--echo #
|
--echo #
|
||||||
|
|
Loading…
Reference in a new issue