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
aa292666
Commit
aa292666
authored
Jul 23, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parser: moved 'for system_time' before alias
Due to standard (see 7.6 <table reference>).
parent
a5ec9fc1
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
40 additions
and
32 deletions
+40
-32
mysql-test/suite/versioning/r/cte.result
mysql-test/suite/versioning/r/cte.result
+4
-4
mysql-test/suite/versioning/r/derived.result
mysql-test/suite/versioning/r/derived.result
+9
-5
mysql-test/suite/versioning/r/vtmd.result
mysql-test/suite/versioning/r/vtmd.result
+4
-4
mysql-test/suite/versioning/r/vtmd_show.result
mysql-test/suite/versioning/r/vtmd_show.result
+2
-2
mysql-test/suite/versioning/t/cte.test
mysql-test/suite/versioning/t/cte.test
+4
-4
mysql-test/suite/versioning/t/derived.test
mysql-test/suite/versioning/t/derived.test
+8
-4
mysql-test/suite/versioning/t/vtmd.test
mysql-test/suite/versioning/t/vtmd.test
+4
-4
mysql-test/suite/versioning/t/vtmd_show.test
mysql-test/suite/versioning/t/vtmd_show.test
+2
-2
sql/sql_yacc.yy
sql/sql_yacc.yy
+3
-3
No files found.
mysql-test/suite/versioning/r/cte.result
View file @
aa292666
...
...
@@ -33,11 +33,11 @@ ancestors
as
(
select e.emp_id, e.name, e.mgr, e.salary
from emp
as e for system_time as of timestamp @ts_1
from emp
for system_time as of timestamp @ts_1 as e
where name = 'bill'
union
select e.emp_id, e.name, e.mgr, e.salary
from emp
as e for system_time as of timestamp @ts_1,
from emp
for system_time as of timestamp @ts_1 as e,
ancestors as a
where e.mgr = a.emp_id
)
...
...
@@ -51,11 +51,11 @@ ancestors
as
(
select e.emp_id, e.name, e.mgr, e.salary
from emp
as e for system_time as of timestamp @ts_2
from emp
for system_time as of timestamp @ts_2 as e
where name = 'bill'
union
select e.emp_id, e.name, e.mgr, e.salary
from emp
as e for system_time as of timestamp @ts_2
,
from emp
for system_time as of timestamp @ts_2 as e
,
ancestors as a
where e.mgr = a.emp_id
)
...
...
mysql-test/suite/versioning/r/derived.result
View file @
aa292666
...
...
@@ -91,12 +91,14 @@ ancestors
as
(
select e.emp_id, e.name, e.mgr
from emp as e
for system_time as of timestamp @ts
from emp as e
where name = 'bill'
union
system_time as of timestamp @ts
union
select ee.emp_id, ee.name, ee.mgr
from emp as ee
for system_time as of timestamp @ts, ancestors as a for system_time as of timestamp @ts
from emp as ee
, ancestors as a
where ee.mgr = a.emp_id
system_time as of timestamp @ts
)
select * from ancestors;
emp_id name mgr
...
...
@@ -109,12 +111,14 @@ ancestors
as
(
select e.emp_id, e.name, e.mgr
from emp as e
for system_time as of timestamp @ts
from emp as e
where name = 'bill'
system_time as of timestamp @ts
union
select ee.emp_id, ee.name, ee.mgr
from emp as ee
for system_time as of timestamp @ts, ancestors as a for system_time as of timestamp @ts
from emp as ee
, ancestors as a
where ee.mgr = a.emp_id
system_time as of timestamp @ts
)
select * from ancestors";
prepare stmt from @tmp;
...
...
mysql-test/suite/versioning/r/vtmd.result
View file @
aa292666
...
...
@@ -8,8 +8,8 @@ declare continue handler for not found set cur_done = true;
set @tmp= concat('
create or replace temporary table
cur_tmp as
select vtmd.archive_name from ', vtmd_name, '
as vtmd
for system_time all
select vtmd.archive_name from ', vtmd_name, '
for system_time all
as vtmd
where vtmd.archive_name is not null
group by vtmd.archive_name');
prepare stmt from @tmp; execute stmt; drop prepare stmt;
...
...
@@ -29,8 +29,8 @@ begin
set @tmp= concat('
create or replace temporary table
tmp_vtmd with system versioning as
select * from ', vtmd_name, '
as vtmd
for system_time all');
select * from ', vtmd_name, '
for system_time all
as vtmd
');
prepare stmt from @tmp; execute stmt; drop prepare stmt;
set @inf= 0xFFFFFFFFFFFFFFFF + 0;
set @start= null;
...
...
mysql-test/suite/versioning/r/vtmd_show.result
View file @
aa292666
...
...
@@ -8,8 +8,8 @@ declare continue handler for not found set cur_done = true;
set @tmp= concat('
create or replace temporary table
cur_tmp as
select vtmd.archive_name from ', vtmd_name, '
as vtmd
for system_time all
select vtmd.archive_name from ', vtmd_name, '
for system_time all
as vtmd
where vtmd.archive_name is not null
group by vtmd.archive_name');
prepare stmt from @tmp; execute stmt; drop prepare stmt;
...
...
mysql-test/suite/versioning/t/cte.test
View file @
aa292666
...
...
@@ -39,11 +39,11 @@ ancestors
as
(
select
e
.
emp_id
,
e
.
name
,
e
.
mgr
,
e
.
salary
from
emp
as
e
for
system_time
as
of
timestamp
@
ts_1
from
emp
for
system_time
as
of
timestamp
@
ts_1
as
e
where
name
=
'bill'
union
select
e
.
emp_id
,
e
.
name
,
e
.
mgr
,
e
.
salary
from
emp
as
e
for
system_time
as
of
timestamp
@
ts_1
,
from
emp
for
system_time
as
of
timestamp
@
ts_1
as
e
,
ancestors
as
a
where
e
.
mgr
=
a
.
emp_id
)
...
...
@@ -55,11 +55,11 @@ ancestors
as
(
select
e
.
emp_id
,
e
.
name
,
e
.
mgr
,
e
.
salary
from
emp
as
e
for
system_time
as
of
timestamp
@
ts_2
from
emp
for
system_time
as
of
timestamp
@
ts_2
as
e
where
name
=
'bill'
union
select
e
.
emp_id
,
e
.
name
,
e
.
mgr
,
e
.
salary
from
emp
as
e
for
system_time
as
of
timestamp
@
ts_2
,
from
emp
for
system_time
as
of
timestamp
@
ts_2
as
e
,
ancestors
as
a
where
e
.
mgr
=
a
.
emp_id
)
...
...
mysql-test/suite/versioning/t/derived.test
View file @
aa292666
...
...
@@ -62,12 +62,14 @@ ancestors
as
(
select
e
.
emp_id
,
e
.
name
,
e
.
mgr
from
emp
as
e
for
system_time
as
of
timestamp
@
ts
from
emp
as
e
where
name
=
'bill'
system_time
as
of
timestamp
@
ts
union
select
ee
.
emp_id
,
ee
.
name
,
ee
.
mgr
from
emp
as
ee
for
system_time
as
of
timestamp
@
ts
,
ancestors
as
a
for
system_time
as
of
timestamp
@
ts
from
emp
as
ee
,
ancestors
as
a
where
ee
.
mgr
=
a
.
emp_id
system_time
as
of
timestamp
@
ts
)
select
*
from
ancestors
;
set
@
tmp
=
"
...
...
@@ -76,12 +78,14 @@ ancestors
as
(
select e.emp_id, e.name, e.mgr
from emp as e
for system_time as of timestamp @ts
from emp as e
where name = 'bill'
system_time as of timestamp @ts
union
select ee.emp_id, ee.name, ee.mgr
from emp as ee
for system_time as of timestamp @ts, ancestors as a for system_time as of timestamp @ts
from emp as ee
, ancestors as a
where ee.mgr = a.emp_id
system_time as of timestamp @ts
)
select * from ancestors"
;
prepare
stmt
from
@
tmp
;
execute
stmt
;
drop
prepare
stmt
;
...
...
mysql-test/suite/versioning/t/vtmd.test
View file @
aa292666
...
...
@@ -11,8 +11,8 @@ begin
set
@
tmp
=
concat
(
'
create or replace temporary table
cur_tmp as
select vtmd.archive_name from '
,
vtmd_name
,
'
as vtmd
for system_time all
select vtmd.archive_name from '
,
vtmd_name
,
'
for system_time all
as vtmd
where vtmd.archive_name is not null
group by vtmd.archive_name'
);
prepare
stmt
from
@
tmp
;
execute
stmt
;
drop
prepare
stmt
;
...
...
@@ -37,8 +37,8 @@ begin
set
@
tmp
=
concat
(
'
create or replace temporary table
tmp_vtmd with system versioning as
select * from '
,
vtmd_name
,
'
as vtmd
for system_time all'
);
select * from '
,
vtmd_name
,
'
for system_time all
as vtmd
'
);
prepare
stmt
from
@
tmp
;
execute
stmt
;
drop
prepare
stmt
;
set
@
inf
=
0xFFFFFFFFFFFFFFFF
+
0
;
...
...
mysql-test/suite/versioning/t/vtmd_show.test
View file @
aa292666
...
...
@@ -10,8 +10,8 @@ begin
set
@
tmp
=
concat
(
'
create or replace temporary table
cur_tmp as
select vtmd.archive_name from '
,
vtmd_name
,
'
as vtmd
for system_time all
select vtmd.archive_name from '
,
vtmd_name
,
'
for system_time all
as vtmd
where vtmd.archive_name is not null
group by vtmd.archive_name'
);
prepare
stmt
from
@
tmp
;
execute
stmt
;
drop
prepare
stmt
;
...
...
sql/sql_yacc.yy
View file @
aa292666
...
...
@@ -11334,9 +11334,9 @@ table_primary_ident:
SELECT_LEX *sel= Select;
sel->table_join_options= 0;
}
table_ident opt_use_partition opt_
table_alias opt_key_definition opt_for_system_time_clause
table_ident opt_use_partition opt_
for_system_time_clause opt_table_alias opt_key_definition
{
if (!($$= Select->add_table_to_list(thd, $2, $
4
,
if (!($$= Select->add_table_to_list(thd, $2, $
5
,
Select->get_table_join_options(),
YYPS->m_lock_type,
YYPS->m_mdl_type,
...
...
@@ -11344,7 +11344,7 @@ table_primary_ident:
$3)))
MYSQL_YYABORT;
Select->add_joined_table($$);
if ($
6
)
if ($
4
)
$$->vers_conditions= Lex->vers_conditions;
}
;
...
...
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