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
e43c7a2f
Commit
e43c7a2f
authored
Jan 14, 2011
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Testcase Backport: BUG#48093: 6.0 Server not processing equivalent IN clauses properly
parent
26599d92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
mysql-test/r/index_merge_innodb.result
mysql-test/r/index_merge_innodb.result
+31
-0
mysql-test/t/index_merge_innodb.test
mysql-test/t/index_merge_innodb.test
+34
-0
No files found.
mysql-test/r/index_merge_innodb.result
View file @
e43c7a2f
...
@@ -709,3 +709,34 @@ WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
...
@@ -709,3 +709,34 @@ WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
COUNT(*)
COUNT(*)
6145
6145
DROP TABLE t1;
DROP TABLE t1;
#
# Testcase Backport: BUG#48093: 6.0 Server not processing equivalent IN clauses properly
# with Innodb tables
#
CREATE TABLE t1 (
i int(11) DEFAULT NULL,
v1 varchar(1) DEFAULT NULL,
v2 varchar(20) DEFAULT NULL,
KEY i (i),
KEY v (v1,i)
) ENGINE=innodb;
INSERT INTO t1 VALUES (1,'f','no');
INSERT INTO t1 VALUES (2,'u','yes-u');
INSERT INTO t1 VALUES (2,'h','yes-h');
INSERT INTO t1 VALUES (3,'d','no');
SELECT v2
FROM t1
WHERE v1 IN ('f', 'd', 'h', 'u' ) AND i = 2;
v2
yes-u
yes-h
# Should not use index_merge
EXPLAIN
SELECT v2
FROM t1
WHERE v1 IN ('f', 'd', 'h', 'u' ) AND i = 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref i,v i 5 const 2 Using where
DROP TABLE t1;
mysql-test/t/index_merge_innodb.test
View file @
e43c7a2f
...
@@ -84,3 +84,37 @@ SELECT COUNT(*) FROM
...
@@ -84,3 +84,37 @@ SELECT COUNT(*) FROM
WHERE
a
BETWEEN
2
AND
7
OR
pk
=
1000000
)
AS
t
;
WHERE
a
BETWEEN
2
AND
7
OR
pk
=
1000000
)
AS
t
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Testcase Backport: BUG#48093: 6.0 Server not processing equivalent IN clauses properly
--
echo
# with Innodb tables
--
echo
#
CREATE
TABLE
t1
(
i
int
(
11
)
DEFAULT
NULL
,
v1
varchar
(
1
)
DEFAULT
NULL
,
v2
varchar
(
20
)
DEFAULT
NULL
,
KEY
i
(
i
),
KEY
v
(
v1
,
i
)
)
ENGINE
=
innodb
;
INSERT
INTO
t1
VALUES
(
1
,
'f'
,
'no'
);
INSERT
INTO
t1
VALUES
(
2
,
'u'
,
'yes-u'
);
INSERT
INTO
t1
VALUES
(
2
,
'h'
,
'yes-h'
);
INSERT
INTO
t1
VALUES
(
3
,
'd'
,
'no'
);
--
echo
SELECT
v2
FROM
t1
WHERE
v1
IN
(
'f'
,
'd'
,
'h'
,
'u'
)
AND
i
=
2
;
--
echo
--
echo
# Should not use index_merge
EXPLAIN
SELECT
v2
FROM
t1
WHERE
v1
IN
(
'f'
,
'd'
,
'h'
,
'u'
)
AND
i
=
2
;
DROP
TABLE
t1
;
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