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
352d8356
Commit
352d8356
authored
Mar 16, 2017
by
kevg
Committed by
Aleksey Midenkov
May 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: versioning for tmp HEAP tables created from IB tables [closes #158]
parent
1894fab1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
mysql-test/suite/versioning/r/view.result
mysql-test/suite/versioning/r/view.result
+1
-0
sql/sql_select.cc
sql/sql_select.cc
+8
-1
No files found.
mysql-test/suite/versioning/r/view.result
View file @
352d8356
...
@@ -55,6 +55,7 @@ x
...
@@ -55,6 +55,7 @@ x
prepare stmt from 'select * from vt1 for system_time as of timestamp @t1';
prepare stmt from 'select * from vt1 for system_time as of timestamp @t1';
execute stmt;
execute stmt;
x
x
1
drop prepare stmt;
drop prepare stmt;
create or replace view vt1 as select * from t1;
create or replace view vt1 as select * from t1;
select * from vt1 for system_time all;
select * from vt1 for system_time all;
...
...
sql/sql_select.cc
View file @
352d8356
...
@@ -864,7 +864,14 @@ int vers_setup_select(THD *thd, TABLE_LIST *tables, COND **where_expr,
...
@@ -864,7 +864,14 @@ int vers_setup_select(THD *thd, TABLE_LIST *tables, COND **where_expr,
}
}
Item
*
cond1
=
0
,
*
cond2
=
0
,
*
curr
=
0
;
Item
*
cond1
=
0
,
*
cond2
=
0
,
*
curr
=
0
;
if
(
table
->
table
->
versioned_by_sql
()
||
vers_simple_select
)
// Temporary tables of type HEAP can be created from INNODB tables and
// thus will have uint64 type of sys_trx_(start|end) field.
// They need special handling.
TABLE
*
t
=
table
->
table
;
if
((
t
->
s
->
table_category
==
TABLE_CATEGORY_TEMPORARY
?
t
->
vers_start_field
()
->
type
()
!=
MYSQL_TYPE_LONGLONG
:
t
->
versioned_by_sql
())
||
vers_simple_select
)
{
{
switch
(
vers_conditions
.
type
)
switch
(
vers_conditions
.
type
)
{
{
...
...
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