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
9ea02899
Commit
9ea02899
authored
Mar 13, 2017
by
kevg
Committed by
Aleksey Midenkov
May 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: nested equi-join for versioned table [fixes #150]
parent
a37cf525
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
mysql-test/suite/versioning/r/select.result
mysql-test/suite/versioning/r/select.result
+3
-0
mysql-test/suite/versioning/t/select.test
mysql-test/suite/versioning/t/select.test
+3
-0
sql/sql_select.cc
sql/sql_select.cc
+3
-3
No files found.
mysql-test/suite/versioning/r/select.result
View file @
9ea02899
...
...
@@ -425,6 +425,9 @@ select * from t1 natural join vt1;
a
1
drop view vt1;
create or replace table t1(x int) with system versioning;
select * from (t1 as r left join t1 as u using (x)), t1;
x x
drop table t1, t2;
call verify_vtq;
No A B C D
...
...
mysql-test/suite/versioning/t/select.test
View file @
9ea02899
...
...
@@ -148,6 +148,9 @@ create view vt1 as select a from t1;
select
*
from
t1
natural
join
vt1
;
drop
view
vt1
;
create
or
replace
table
t1
(
x
int
)
with
system
versioning
;
select
*
from
(
t1
as
r
left
join
t1
as
u
using
(
x
)),
t1
;
drop
table
t1
,
t2
;
call
verify_vtq
;
...
...
sql/sql_select.cc
View file @
9ea02899
...
...
@@ -835,10 +835,10 @@ int vers_setup_select(THD *thd, TABLE_LIST *tables, COND **where_expr,
if
((
table
->
is_derived
()
&&
!
table
->
is_recursive_with_table
())
||
table
->
join_columns
)
{
row_start
=
newx
Item_field
(
thd
,
&
slex
->
context
,
NULL
,
NULL
,
row_start
=
newx
Item_field
(
thd
,
&
slex
->
context
,
table
->
db
,
table
->
alias
,
fstart
->
field_name
);
row_end
=
newx
Item_field
(
thd
,
&
slex
->
context
,
NULL
,
NULL
,
fend
->
field_name
);
row_end
=
newx
Item_field
(
thd
,
&
slex
->
context
,
table
->
db
,
table
->
alias
,
fend
->
field_name
);
}
else
{
...
...
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