1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Backported the fix and the test case for bug 12822678 from the mysql-5.6 code line.

Fixed a bug in select_describe.
Adjusted results for affected test cases.
This commit is contained in:
Igor Babaev
2011-11-01 07:00:55 -07:00
parent 0efacfcfb2
commit a70f7aa5fe
11 changed files with 112 additions and 7 deletions

View File

@ -579,6 +579,32 @@ SELECT col999 FROM t1 WHERE col1000 = "3" AND col1003 <=> sysdate();
col999
DROP TABLE t1;
#
# BUG#12822678 - ICP WITH STRAIGHT_JOIN
#
CREATE TABLE t1 (
i1 INTEGER NOT NULL,
d1 DOUBLE,
KEY k1 (d1)
);
INSERT INTO t1 VALUES (10,1), (17,NULL), (22,NULL);
CREATE TABLE t2 (
pk INTEGER NOT NULL,
i1 INTEGER NOT NULL,
PRIMARY KEY (pk)
);
INSERT INTO t2 VALUES (4,1);
EXPLAIN
SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1
WHERE t2.pk <> t1.d1 AND t2.pk = 4;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL k1 9 NULL 3 Using index
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1 Using where
SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1
WHERE t2.pk <> t1.d1 AND t2.pk = 4;
d1 pk i1
1 4 1
DROP TABLE t1, t2;
#
# BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89
#
CREATE TABLE t1 ( f11 int) ;