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
711f3dd7
Commit
711f3dd7
authored
Jan 29, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-13417 UPDATE produces wrong values if an updated column is later used as an update source
replication tests
parent
d943d7f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
1 deletion
+32
-1
mysql-test/suite/rpl/r/rpl_update.result
mysql-test/suite/rpl/r/rpl_update.result
+16
-0
mysql-test/suite/rpl/t/rpl_update.test
mysql-test/suite/rpl/t/rpl_update.test
+15
-0
sql/log_event.cc
sql/log_event.cc
+1
-1
No files found.
mysql-test/suite/rpl/r/rpl_update.result
0 → 100644
View file @
711f3dd7
include/master-slave.inc
[connection master]
set sql_mode=simultaneous_assignment;
create table t1 (a int, b int);
insert into t1 values(1, 2);
update t1 set a=b, b=a;
select * from t1;
a b
2 1
connection slave;
select * from t1;
a b
2 1
connection master;
drop table t1;
include/rpl_end.inc
mysql-test/suite/rpl/t/rpl_update.test
0 → 100644
View file @
711f3dd7
source
include
/
master
-
slave
.
inc
;
#
# MDEV-13417 UPDATE produces wrong values if an updated column is later used as an update source
#
set
sql_mode
=
simultaneous_assignment
;
create
table
t1
(
a
int
,
b
int
);
insert
into
t1
values
(
1
,
2
);
update
t1
set
a
=
b
,
b
=
a
;
select
*
from
t1
;
sync_slave_with_master
;
select
*
from
t1
;
connection
master
;
drop
table
t1
;
source
include
/
rpl_end
.
inc
;
sql/log_event.cc
View file @
711f3dd7
...
...
@@ -5438,7 +5438,7 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi,
if
(
sql_mode_inited
)
thd
->
variables
.
sql_mode
=
(
sql_mode_t
)
((
thd
->
variables
.
sql_mode
&
MODE_NO_DIR_IN_CREATE
)
|
(
sql_mode
&
~
(
ulong
)
MODE_NO_DIR_IN_CREATE
));
(
sql_mode
&
~
(
sql_mode_t
)
MODE_NO_DIR_IN_CREATE
));
if
(
charset_inited
)
{
rpl_sql_thread_info
*
sql_info
=
thd
->
system_thread_info
.
rpl_sql_info
;
...
...
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