Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
37f3a801
Commit
37f3a801
authored
May 29, 2011
by
Igor Babaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backported the test case for bug 52605.
parent
061060ea
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
134 additions
and
0 deletions
+134
-0
mysql-test/include/icp_tests.inc
mysql-test/include/icp_tests.inc
+35
-0
mysql-test/r/innodb_icp.result
mysql-test/r/innodb_icp.result
+33
-0
mysql-test/r/maria_icp.result
mysql-test/r/maria_icp.result
+33
-0
mysql-test/r/myisam_icp.result
mysql-test/r/myisam_icp.result
+33
-0
No files found.
mysql-test/include/icp_tests.inc
View file @
37f3a801
...
...
@@ -402,6 +402,41 @@ SELECT * FROM t2;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# Bug#52605 - "Adding LIMIT 1 clause to query with complex range
--
echo
# predicate causes wrong results"
--
echo
#
CREATE
TABLE
t1
(
pk
INT
NOT
NULL
,
c1
INT
,
PRIMARY
KEY
(
pk
),
KEY
k1
(
c1
)
);
INSERT
INTO
t1
VALUES
(
1
,
NULL
);
INSERT
INTO
t1
VALUES
(
2
,
6
);
INSERT
INTO
t1
VALUES
(
3
,
NULL
);
INSERT
INTO
t1
VALUES
(
4
,
6
);
INSERT
INTO
t1
VALUES
(
5
,
NULL
);
INSERT
INTO
t1
VALUES
(
6
,
NULL
);
INSERT
INTO
t1
VALUES
(
7
,
9
);
INSERT
INTO
t1
VALUES
(
8
,
0
);
SELECT
pk
,
c1
FROM
t1
WHERE
(
pk
BETWEEN
4
AND
5
OR
pk
<
2
)
AND
c1
<
240
ORDER
BY
c1
LIMIT
1
;
EXPLAIN
SELECT
pk
,
c1
FROM
t1
WHERE
(
pk
BETWEEN
4
AND
5
OR
pk
<
2
)
AND
c1
<
240
ORDER
BY
c1
LIMIT
1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#59259 "Incorrect rows returned for a correlated subquery
--
echo
# when ICP is on"
...
...
mysql-test/r/innodb_icp.result
View file @
37f3a801
...
...
@@ -377,6 +377,39 @@ a b
5 5
DROP TABLE t1, t2;
#
# Bug#52605 - "Adding LIMIT 1 clause to query with complex range
# predicate causes wrong results"
#
CREATE TABLE t1 (
pk INT NOT NULL,
c1 INT,
PRIMARY KEY (pk),
KEY k1 (c1)
);
INSERT INTO t1 VALUES (1,NULL);
INSERT INTO t1 VALUES (2,6);
INSERT INTO t1 VALUES (3,NULL);
INSERT INTO t1 VALUES (4,6);
INSERT INTO t1 VALUES (5,NULL);
INSERT INTO t1 VALUES (6,NULL);
INSERT INTO t1 VALUES (7,9);
INSERT INTO t1 VALUES (8,0);
SELECT pk, c1
FROM t1
WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240
ORDER BY c1
LIMIT 1;
pk c1
4 6
EXPLAIN SELECT pk, c1
FROM t1
WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240
ORDER BY c1
LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,k1 k1 5 NULL 3 Using where; Using index
DROP TABLE t1;
#
# Bug#59259 "Incorrect rows returned for a correlated subquery
# when ICP is on"
#
...
...
mysql-test/r/maria_icp.result
View file @
37f3a801
...
...
@@ -377,6 +377,39 @@ a b
5 5
DROP TABLE t1, t2;
#
# Bug#52605 - "Adding LIMIT 1 clause to query with complex range
# predicate causes wrong results"
#
CREATE TABLE t1 (
pk INT NOT NULL,
c1 INT,
PRIMARY KEY (pk),
KEY k1 (c1)
);
INSERT INTO t1 VALUES (1,NULL);
INSERT INTO t1 VALUES (2,6);
INSERT INTO t1 VALUES (3,NULL);
INSERT INTO t1 VALUES (4,6);
INSERT INTO t1 VALUES (5,NULL);
INSERT INTO t1 VALUES (6,NULL);
INSERT INTO t1 VALUES (7,9);
INSERT INTO t1 VALUES (8,0);
SELECT pk, c1
FROM t1
WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240
ORDER BY c1
LIMIT 1;
pk c1
4 6
EXPLAIN SELECT pk, c1
FROM t1
WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240
ORDER BY c1
LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,k1 k1 5 NULL 4 Using where
DROP TABLE t1;
#
# Bug#59259 "Incorrect rows returned for a correlated subquery
# when ICP is on"
#
...
...
mysql-test/r/myisam_icp.result
View file @
37f3a801
...
...
@@ -375,6 +375,39 @@ a b
5 5
DROP TABLE t1, t2;
#
# Bug#52605 - "Adding LIMIT 1 clause to query with complex range
# predicate causes wrong results"
#
CREATE TABLE t1 (
pk INT NOT NULL,
c1 INT,
PRIMARY KEY (pk),
KEY k1 (c1)
);
INSERT INTO t1 VALUES (1,NULL);
INSERT INTO t1 VALUES (2,6);
INSERT INTO t1 VALUES (3,NULL);
INSERT INTO t1 VALUES (4,6);
INSERT INTO t1 VALUES (5,NULL);
INSERT INTO t1 VALUES (6,NULL);
INSERT INTO t1 VALUES (7,9);
INSERT INTO t1 VALUES (8,0);
SELECT pk, c1
FROM t1
WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240
ORDER BY c1
LIMIT 1;
pk c1
4 6
EXPLAIN SELECT pk, c1
FROM t1
WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240
ORDER BY c1
LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,k1 k1 5 NULL 4 Using where
DROP TABLE t1;
#
# Bug#59259 "Incorrect rows returned for a correlated subquery
# when ICP is on"
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment