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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2eda310b
Commit
2eda310b
authored
Jun 14, 2024
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore test coverage for MDEV-18956
(It was accidentally removed by fix for MDEV-28846)
parent
0903276e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
23 deletions
+32
-23
mysql-test/main/rowid_filter.result
mysql-test/main/rowid_filter.result
+11
-8
mysql-test/main/rowid_filter.test
mysql-test/main/rowid_filter.test
+10
-7
mysql-test/main/rowid_filter_innodb.result
mysql-test/main/rowid_filter_innodb.result
+11
-8
No files found.
mysql-test/main/rowid_filter.result
View file @
2eda310b
...
...
@@ -2036,21 +2036,24 @@ DROP TABLE t1;
CREATE TABLE t1 (pk int) engine=myisam ;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (
pk int auto_increment PRIMARY KEY,
i1 int, i2 int, c2 varchar(1),
KEY (i1), KEY (i2)
pk int PRIMARY KEY,
i1 int, i2 int,
c2 varchar(100),
KEY (i1),
KEY (i2)
) engine=myisam;
INSERT INTO t2 VALUES
(1,8,6,'t'),(2,5,7,'i'),(3,4,4,'h'),(4,207,38,'d'),(5,183,206,'b'),
(6,7,null,'o'),(7,1,2,'j'),(8,17,36,'s'),(9,4,5,'q'),(10,0,6,'l'),
(11,1,9,'j'),(12,5,6,'y'),(13,null,0,'i'),(14,7,7,'x'),(15,5,2,'u');
insert into t2
select
seq, floor(seq/100), floor(seq/100), 'abcd'
from
seq_1_to_10000;
SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
pk
EXPLAIN EXTENDED
SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
2 SUBQUERY
t2 ref i1,i2 i1 5 const 1 100.00 Using index condition; Using wher
e
2 SUBQUERY
NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const tabl
e
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk` from `test`.`t1` having 0
DROP TABLE t1,t2;
...
...
mysql-test/main/rowid_filter.test
View file @
2eda310b
...
...
@@ -298,15 +298,18 @@ CREATE TABLE t1 (pk int) engine=myisam ;
INSERT
INTO
t1
VALUES
(
1
),(
2
);
CREATE
TABLE
t2
(
pk
int
auto_increment
PRIMARY
KEY
,
i1
int
,
i2
int
,
c2
varchar
(
1
),
KEY
(
i1
),
KEY
(
i2
)
pk
int
PRIMARY
KEY
,
i1
int
,
i2
int
,
c2
varchar
(
100
),
KEY
(
i1
),
KEY
(
i2
)
)
engine
=
myisam
;
INSERT
INTO
t2
VALUES
(
1
,
8
,
6
,
't'
),(
2
,
5
,
7
,
'i'
),(
3
,
4
,
4
,
'h'
),(
4
,
207
,
38
,
'd'
),(
5
,
183
,
206
,
'b'
),
(
6
,
7
,
null
,
'o'
),(
7
,
1
,
2
,
'j'
),(
8
,
17
,
36
,
's'
),(
9
,
4
,
5
,
'q'
),(
10
,
0
,
6
,
'l'
),
(
11
,
1
,
9
,
'j'
),(
12
,
5
,
6
,
'y'
),(
13
,
null
,
0
,
'i'
),(
14
,
7
,
7
,
'x'
),(
15
,
5
,
2
,
'u'
);
insert
into
t2
select
seq
,
floor
(
seq
/
100
),
floor
(
seq
/
100
),
'abcd'
from
seq_1_to_10000
;
SELECT
*
FROM
t1
HAVING
(
7
,
9
)
IN
(
SELECT
t2
.
i1
,
t2
.
i2
FROM
t2
WHERE
t2
.
i1
=
3
);
EXPLAIN
EXTENDED
...
...
mysql-test/main/rowid_filter_innodb.result
View file @
2eda310b
...
...
@@ -1982,21 +1982,24 @@ DROP TABLE t1;
CREATE TABLE t1 (pk int) engine=myisam ;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (
pk int auto_increment PRIMARY KEY,
i1 int, i2 int, c2 varchar(1),
KEY (i1), KEY (i2)
pk int PRIMARY KEY,
i1 int, i2 int,
c2 varchar(100),
KEY (i1),
KEY (i2)
) engine=myisam;
INSERT INTO t2 VALUES
(1,8,6,'t'),(2,5,7,'i'),(3,4,4,'h'),(4,207,38,'d'),(5,183,206,'b'),
(6,7,null,'o'),(7,1,2,'j'),(8,17,36,'s'),(9,4,5,'q'),(10,0,6,'l'),
(11,1,9,'j'),(12,5,6,'y'),(13,null,0,'i'),(14,7,7,'x'),(15,5,2,'u');
insert into t2
select
seq, floor(seq/100), floor(seq/100), 'abcd'
from
seq_1_to_10000;
SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
pk
EXPLAIN EXTENDED
SELECT * FROM t1 HAVING (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
2 SUBQUERY
t2 ref i1,i2 i1 5 const 1 100.00 Using index condition; Using wher
e
2 SUBQUERY
NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const tabl
e
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk` from `test`.`t1` having 0
DROP TABLE t1,t2;
...
...
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