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
61eff52d
Commit
61eff52d
authored
Aug 30, 2004
by
timour@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added test for BUG#3759
parent
4d070fd9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
mysql-test/r/select.result
mysql-test/r/select.result
+21
-0
mysql-test/t/select.test
mysql-test/t/select.test
+14
-0
No files found.
mysql-test/r/select.result
View file @
61eff52d
...
@@ -2327,3 +2327,24 @@ select * from t2,t3 where t2.s = t3.s;
...
@@ -2327,3 +2327,24 @@ select * from t2,t3 where t2.s = t3.s;
s s
s s
two two
two two
drop table t1, t2, t3;
drop table t1, t2, t3;
create table t1 (a integer, b integer, index(a), index(b));
create table t2 (c integer, d integer, index(c), index(d));
insert into t1 values (1,2), (2,2), (3,2), (4,2);
insert into t2 values (1,3), (2,3), (3,4), (4,4);
explain select * from t1 left join t2 on a=c where d in (4);
table type possible_keys key key_len ref rows Extra
t2 ref c,d d 5 const 2 Using where
t1 ALL a NULL NULL NULL 3 Using where
select * from t1 left join t2 on a=c where d in (4);
a b c d
3 2 3 4
4 2 4 4
explain select * from t1 left join t2 on a=c where d = 4;
table type possible_keys key key_len ref rows Extra
t2 ref c,d d 5 const 2 Using where
t1 ALL a NULL NULL NULL 3 Using where
select * from t1 left join t2 on a=c where d = 4;
a b c d
3 2 3 4
4 2 4 4
drop table t1, t2;
mysql-test/t/select.test
View file @
61eff52d
...
@@ -1874,3 +1874,17 @@ select * from t3 where s = 'one';
...
@@ -1874,3 +1874,17 @@ select * from t3 where s = 'one';
select
*
from
t1
,
t2
where
t1
.
s
=
t2
.
s
;
select
*
from
t1
,
t2
where
t1
.
s
=
t2
.
s
;
select
*
from
t2
,
t3
where
t2
.
s
=
t3
.
s
;
select
*
from
t2
,
t3
where
t2
.
s
=
t3
.
s
;
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
#
# Bug #3759
# Both queries should produce identical plans and results.
#
create
table
t1
(
a
integer
,
b
integer
,
index
(
a
),
index
(
b
));
create
table
t2
(
c
integer
,
d
integer
,
index
(
c
),
index
(
d
));
insert
into
t1
values
(
1
,
2
),
(
2
,
2
),
(
3
,
2
),
(
4
,
2
);
insert
into
t2
values
(
1
,
3
),
(
2
,
3
),
(
3
,
4
),
(
4
,
4
);
explain
select
*
from
t1
left
join
t2
on
a
=
c
where
d
in
(
4
);
select
*
from
t1
left
join
t2
on
a
=
c
where
d
in
(
4
);
explain
select
*
from
t1
left
join
t2
on
a
=
c
where
d
=
4
;
select
*
from
t1
left
join
t2
on
a
=
c
where
d
=
4
;
drop
table
t1
,
t2
;
\ No newline at end of file
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