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
dd2d5992
Commit
dd2d5992
authored
Nov 19, 2012
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-3801
Adjust unstable test case.
parent
60a7b058
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
27 deletions
+26
-27
mysql-test/r/derived_opt.result
mysql-test/r/derived_opt.result
+17
-19
mysql-test/t/derived_opt.test
mysql-test/t/derived_opt.test
+9
-8
No files found.
mysql-test/r/derived_opt.result
View file @
dd2d5992
...
...
@@ -310,28 +310,26 @@ PRIMARY KEY (a)
) ENGINE=MyISAM;
INSERT INTO t4 VALUES ('CD');
set @@tmp_table_size=8192;
EXPLAIN
EXTENDED
SELECT * FROM t3 AS t
X JOIN t2 AS tY ON (tX.pk = tY
.pk)
EXPLAIN
SELECT * FROM t3 AS t
x JOIN t2 AS ty ON (tx.pk = ty
.pk)
WHERE
t
X
.pk IN
t
x
.pk IN
(SELECT *
FROM (SELECT DISTINCT t
A
.pk
FROM t3 AS t
A
JOIN t2 AS t
B ON (tA.pk = tB
.pk)
JOIN t1 AS t
C ON (tB.pk = tC
.pk)
JOIN t4 AS t
D ON tC.a = tD.a) tU
)
FROM (SELECT DISTINCT t
a
.pk
FROM t3 AS t
a
JOIN t2 AS t
b ON (ta.pk = tb
.pk)
JOIN t1 AS t
c ON (tb.pk = tc
.pk)
JOIN t4 AS t
d ON tc.a = td.a) tu
)
limit 10;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 1833 100.00
1 PRIMARY tX eq_ref PRIMARY PRIMARY 4 tU.pk 1 100.00 Using index
1 PRIMARY tY eq_ref PRIMARY PRIMARY 4 tU.pk 1 100.00 Using index
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 1833 100.00
3 DERIVED tD system PRIMARY NULL NULL NULL 1 100.00 Using temporary
3 DERIVED tC ref PRIMARY,a a 3 const 1833 100.00
3 DERIVED tA eq_ref PRIMARY PRIMARY 4 test.tC.pk 1 100.00 Using index
3 DERIVED tB eq_ref PRIMARY PRIMARY 4 test.tC.pk 1 100.00 Using index; Distinct
Warnings:
Note 1003 select `test`.`tX`.`pk` AS `pk`,`test`.`tY`.`pk` AS `pk` from `test`.`t3` `tX` semi join ((select distinct `test`.`tA`.`pk` AS `pk` from `test`.`t3` `tA` join `test`.`t2` `tB` join `test`.`t1` `tC` join `test`.`t4` `tD` where ((`test`.`tA`.`pk` = `test`.`tC`.`pk`) and (`test`.`tB`.`pk` = `test`.`tC`.`pk`) and (`test`.`tC`.`a` = 'CD'))) `tU`) join `test`.`t2` `tY` where ((`test`.`tX`.`pk` = `tU`.`pk`) and (`test`.`tY`.`pk` = `tU`.`pk`)) limit 10
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL #
1 PRIMARY tx eq_ref PRIMARY PRIMARY 4 tu.pk # Using index
1 PRIMARY ty eq_ref PRIMARY PRIMARY 4 tu.pk # Using index
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL #
3 DERIVED td system PRIMARY NULL NULL NULL # Using temporary
3 DERIVED tc ref PRIMARY,a a 3 const #
3 DERIVED ta eq_ref PRIMARY PRIMARY 4 test.tc.pk # Using index
3 DERIVED tb eq_ref PRIMARY PRIMARY 4 test.tc.pk # Using index; Distinct
SELECT * FROM t3 AS tX JOIN t2 AS tY ON (tX.pk = tY.pk)
WHERE
tX.pk IN
...
...
mysql-test/t/derived_opt.test
View file @
dd2d5992
...
...
@@ -246,16 +246,17 @@ INSERT INTO t4 VALUES ('CD');
set
@@
tmp_table_size
=
8192
;
EXPLAIN
EXTENDED
SELECT
*
FROM
t3
AS
tX
JOIN
t2
AS
tY
ON
(
tX
.
pk
=
tY
.
pk
)
--
replace_column
9
#
EXPLAIN
SELECT
*
FROM
t3
AS
tx
JOIN
t2
AS
ty
ON
(
tx
.
pk
=
ty
.
pk
)
WHERE
t
X
.
pk
IN
t
x
.
pk
IN
(
SELECT
*
FROM
(
SELECT
DISTINCT
t
A
.
pk
FROM
t3
AS
t
A
JOIN
t2
AS
t
B
ON
(
tA
.
pk
=
tB
.
pk
)
JOIN
t1
AS
t
C
ON
(
tB
.
pk
=
tC
.
pk
)
JOIN
t4
AS
t
D
ON
tC
.
a
=
tD
.
a
)
tU
)
FROM
(
SELECT
DISTINCT
t
a
.
pk
FROM
t3
AS
t
a
JOIN
t2
AS
t
b
ON
(
ta
.
pk
=
tb
.
pk
)
JOIN
t1
AS
t
c
ON
(
tb
.
pk
=
tc
.
pk
)
JOIN
t4
AS
t
d
ON
tc
.
a
=
td
.
a
)
tu
)
limit
10
;
SELECT
*
FROM
t3
AS
tX
JOIN
t2
AS
tY
ON
(
tX
.
pk
=
tY
.
pk
)
...
...
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