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
a3274c22
Commit
a3274c22
authored
Apr 16, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for a bug with two natural joins.
parent
24aba046
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
mysql-test/r/join_outer.result
mysql-test/r/join_outer.result
+12
-0
mysql-test/t/join_outer.test
mysql-test/t/join_outer.test
+9
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-2
No files found.
mysql-test/r/join_outer.result
View file @
a3274c22
...
@@ -652,3 +652,15 @@ fooID barID fooID
...
@@ -652,3 +652,15 @@ fooID barID fooID
20 2 NULL
20 2 NULL
30 3 30
30 3 30
drop table t1,t2;
drop table t1,t2;
drop table if exists t3;
create table t1 (i int);
create table t2 (i int);
create table t3 (i int);
insert into t1 values(1),(2);
insert into t2 values(2),(3);
insert into t3 values(2),(4);
select * from t1 natural left join t2 natural left join t3;
i i i
1 NULL NULL
2 2 2
drop table t1,t2,t3;
mysql-test/t/join_outer.test
View file @
a3274c22
...
@@ -416,3 +416,12 @@ explain select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30;
...
@@ -416,3 +416,12 @@ explain select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30;
select
*
from
t2
left
join
t1
on
t1
.
fooID
=
t2
.
fooID
and
t1
.
fooID
=
30
;
select
*
from
t2
left
join
t1
on
t1
.
fooID
=
t2
.
fooID
and
t1
.
fooID
=
30
;
select
*
from
t2
left
join
t1
ignore
index
(
primary
)
on
t1
.
fooID
=
t2
.
fooID
and
t1
.
fooID
=
30
;
select
*
from
t2
left
join
t1
ignore
index
(
primary
)
on
t1
.
fooID
=
t2
.
fooID
and
t1
.
fooID
=
30
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
drop
table
if
exists
t3
;
create
table
t1
(
i
int
);
create
table
t2
(
i
int
);
create
table
t3
(
i
int
);
insert
into
t1
values
(
1
),(
2
);
insert
into
t2
values
(
2
),(
3
);
insert
into
t3
values
(
2
),(
4
);
select
*
from
t1
natural
left
join
t2
natural
left
join
t3
;
drop
table
t1
,
t2
,
t3
;
sql/sql_yacc.yy
View file @
a3274c22
...
@@ -495,8 +495,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
...
@@ -495,8 +495,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
/* These don't actually affect the way the query is really evaluated, but
/* These don't actually affect the way the query is really evaluated, but
they silence a few warnings for shift/reduce conflicts. */
they silence a few warnings for shift/reduce conflicts. */
%left ','
%left ','
%left STRAIGHT_JOIN JOIN_SYM
%left STRAIGHT_JOIN JOIN_SYM
NATURAL
%nonassoc CROSS INNER_SYM
NATURAL
LEFT RIGHT
%nonassoc CROSS INNER_SYM LEFT RIGHT
%type <lex_str>
%type <lex_str>
IDENT TEXT_STRING REAL_NUM FLOAT_NUM NUM LONG_NUM HEX_NUM LEX_HOSTNAME
IDENT TEXT_STRING REAL_NUM FLOAT_NUM NUM LONG_NUM HEX_NUM LEX_HOSTNAME
...
...
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