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
7fd54909
Commit
7fd54909
authored
Mar 14, 2017
by
kevg
Committed by
Aleksey Midenkov
May 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IB: return correct sys_trx_end in TRIGGER after UPDATE [fixes #100]
parent
4ebf680c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
1 deletion
+34
-1
mysql-test/suite/versioning/r/select.result
mysql-test/suite/versioning/r/select.result
+18
-0
mysql-test/suite/versioning/t/select.test
mysql-test/suite/versioning/t/select.test
+16
-0
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+0
-1
No files found.
mysql-test/suite/versioning/r/select.result
View file @
7fd54909
...
...
@@ -428,6 +428,22 @@ 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
create or replace table t1 (a int) with system versioning;
insert into t1 values (1);
create trigger read_end after update on t1
for each row set @end = old.sys_trx_end;
update t1 set a=2;
select @end;
@end
2038-01-19 03:14:07.000000
create or replace table t1 (a int) with system versioning engine=innodb;
insert into t1 values (1);
create trigger read_end after update on t1
for each row set @end = old.sys_trx_end;
update t1 set a=2;
select @end;
@end
18446744073709551615
drop table t1, t2;
call verify_vtq;
No A B C D
...
...
@@ -440,6 +456,8 @@ No A B C D
7 1 1 1 1
8 1 1 1 1
9 1 1 1 1
10 1 1 1 1
11 1 1 1 1
drop procedure test_01;
drop procedure test_02;
drop procedure verify_vtq;
mysql-test/suite/versioning/t/select.test
View file @
7fd54909
...
...
@@ -151,6 +151,22 @@ 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
;
# @end should be max timestamp
create
or
replace
table
t1
(
a
int
)
with
system
versioning
;
insert
into
t1
values
(
1
);
create
trigger
read_end
after
update
on
t1
for
each
row
set
@
end
=
old
.
sys_trx_end
;
update
t1
set
a
=
2
;
select
@
end
;
# @end should be max trx_id
create
or
replace
table
t1
(
a
int
)
with
system
versioning
engine
=
innodb
;
insert
into
t1
values
(
1
);
create
trigger
read_end
after
update
on
t1
for
each
row
set
@
end
=
old
.
sys_trx_end
;
update
t1
set
a
=
2
;
select
@
end
;
drop
table
t1
,
t2
;
call
verify_vtq
;
...
...
storage/innobase/row/row0mysql.cc
View file @
7fd54909
...
...
@@ -1497,7 +1497,6 @@ row_insert_for_mysql(
if
(
ins_mode
==
ROW_INS_HISTORICAL
)
{
set_tuple_col_8
(
node
->
row
,
table
->
vers_row_end
,
trx
->
id
,
node
->
entry_sys_heap
);
int8store
(
&
mysql_rec
[
t
->
mysql_col_offset
],
trx
->
id
);
}
else
{
set_tuple_col_8
(
node
->
row
,
table
->
vers_row_end
,
IB_UINT64_MAX
,
node
->
entry_sys_heap
);
...
...
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