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
b6437d7d
Commit
b6437d7d
authored
Jun 10, 2011
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#727183: WL#90 does not trigger with non-comma joins
- Add a testcase (the bug has already been fixed)
parent
9c11646f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
mysql-test/r/subselect_sj_nonmerged.result
mysql-test/r/subselect_sj_nonmerged.result
+15
-0
mysql-test/t/subselect_sj_nonmerged.test
mysql-test/t/subselect_sj_nonmerged.test
+15
-0
No files found.
mysql-test/r/subselect_sj_nonmerged.result
View file @
b6437d7d
...
...
@@ -100,4 +100,19 @@ GROUP BY 1
);
f1
DROP TABLE t1, t2;
#
# BUG#727183: WL#90 does not trigger with non-comma joins
#
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(a int, key(a));
insert into t1 select A.a + 10*B.a + 100*C.a from t0 A, t0 B, t0 C;
# The following must use non-merged SJ-Materialization:
explain select * from t1 X join t0 Y on X.a < Y.a where X.a in (select max(a) from t0);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 1 Using where
1 PRIMARY X ref a a 5 <subquery2>.max(a) 1 Using index
1 PRIMARY Y ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
2 SUBQUERY t0 ALL NULL NULL NULL NULL 10
drop table t0, t1;
set optimizer_switch=@save_optimizer_switch;
mysql-test/t/subselect_sj_nonmerged.test
View file @
b6437d7d
...
...
@@ -95,5 +95,20 @@ WHERE ( f1 ) IN (
);
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# BUG#727183: WL#90 does not trigger with non-comma joins
--
echo
#
create
table
t0
(
a
int
);
insert
into
t0
values
(
0
),(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
);
create
table
t1
(
a
int
,
key
(
a
));
insert
into
t1
select
A
.
a
+
10
*
B
.
a
+
100
*
C
.
a
from
t0
A
,
t0
B
,
t0
C
;
--
echo
# The following must use non-merged SJ-Materialization:
explain
select
*
from
t1
X
join
t0
Y
on
X
.
a
<
Y
.
a
where
X
.
a
in
(
select
max
(
a
)
from
t0
);
drop
table
t0
,
t1
;
set
optimizer_switch
=@
save_optimizer_switch
;
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