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
17745222
Commit
17745222
authored
Mar 05, 2017
by
kevg
Committed by
Aleksey Midenkov
May 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: incorrect check on specific JOIN query [fixes #145]
parent
204b54d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
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_base.cc
sql/sql_base.cc
+3
-2
No files found.
mysql-test/suite/versioning/r/select.result
View file @
17745222
...
...
@@ -406,6 +406,9 @@ create or replace table t1 (x int) with system versioning;
insert into t1 values (1);
select * from t1 for system_time all for update;
ERROR HY000: Wrong parameters for `FOR SYSTEM_TIME query`: write-locking of historic rows
create or replace table t1 (a int not null auto_increment primary key) with system versioning;
select * from (t1 as t2 left join t1 as t3 using (a)) natural left join t1;
a
drop table t1;
call verify_vtq;
No A B C D
...
...
mysql-test/suite/versioning/t/select.test
View file @
17745222
...
...
@@ -131,6 +131,9 @@ insert into t1 values (1);
--
error
ER_VERS_WRONG_PARAMS
select
*
from
t1
for
system_time
all
for
update
;
create
or
replace
table
t1
(
a
int
not
null
auto_increment
primary
key
)
with
system
versioning
;
select
*
from
(
t1
as
t2
left
join
t1
as
t3
using
(
a
))
natural
left
join
t1
;
drop
table
t1
;
call
verify_vtq
;
...
...
sql/sql_base.cc
View file @
17745222
...
...
@@ -6420,8 +6420,9 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2,
if
(
!
my_strcasecmp
(
system_charset_info
,
field_name_1
,
cur_field_name_2
))
{
DBUG_PRINT
(
"info"
,
(
"match c1.is_common=%d"
,
nj_col_1
->
is_common
));
if
(
cur_nj_col_2
->
is_common
||
(
found
&&
(
!
using_fields
||
is_using_column_1
)))
if
((
!
it_1
.
field
()
||
!
it_1
.
field
()
->
vers_sys_field
())
&&
(
cur_nj_col_2
->
is_common
||
(
found
&&
(
!
using_fields
||
is_using_column_1
))))
{
my_error
(
ER_NON_UNIQ_ERROR
,
MYF
(
0
),
field_name_1
,
thd
->
where
);
goto
err
;
...
...
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