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
cc223d38
Commit
cc223d38
authored
Mar 16, 2010
by
Luis Soares
Browse files
Options
Browse Files
Download
Plain Diff
Automerge: mysql-5.1-bugteam bug branch --> mysql-5.1-bugteam latest.
parents
0ed46845
7768ccbb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
1 deletion
+43
-1
mysql-test/suite/rpl/r/rpl_stm_sql_mode.result
mysql-test/suite/rpl/r/rpl_stm_sql_mode.result
+18
-0
mysql-test/suite/rpl/t/rpl_stm_sql_mode.test
mysql-test/suite/rpl/t/rpl_stm_sql_mode.test
+24
-0
sql/log.cc
sql/log.cc
+1
-1
No files found.
mysql-test/suite/rpl/r/rpl_stm_sql_mode.result
0 → 100644
View file @
cc223d38
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TABLE t1 (pk integer auto_increment , primary key (pk));
SET SESSION SQL_MODE='traditional';
# **** [MASTER] *****
# action: raise DUP KEY error (error code should be set in the
# query log event)
INSERT INTO t1 (`pk`) VALUES (1), (1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
DROP TABLE t1;
# **** [ sync slave with master ] ****
# assertion: sync slave with master makes slave not to stop with
# duplicate key error (because it has received event
# with expected error code).
mysql-test/suite/rpl/t/rpl_stm_sql_mode.test
0 → 100644
View file @
cc223d38
--
source
include
/
master
-
slave
.
inc
--
source
include
/
have_binlog_format_statement
.
inc
#
# Bug #51055 Replication failure on duplicate key + traditional SQL mode
#
CREATE
TABLE
t1
(
pk
integer
auto_increment
,
primary
key
(
pk
));
SET
SESSION
SQL_MODE
=
'traditional'
;
--
echo
# **** [MASTER] *****
--
echo
# action: raise DUP KEY error (error code should be set in the
--
echo
# query log event)
--
error
ER_DUP_ENTRY
INSERT
INTO
t1
(
`pk`
)
VALUES
(
1
),
(
1
);
DROP
TABLE
t1
;
--
echo
# **** [ sync slave with master ] ****
--
echo
# assertion: sync slave with master makes slave not to stop with
--
echo
# duplicate key error (because it has received event
--
echo
# with expected error code).
--
sync_slave_with_master
sql/log.cc
View file @
cc223d38
...
@@ -4679,7 +4679,7 @@ int query_error_code(THD *thd, bool not_killed)
...
@@ -4679,7 +4679,7 @@ int query_error_code(THD *thd, bool not_killed)
{
{
int
error
;
int
error
;
if
(
not_killed
)
if
(
not_killed
||
(
thd
->
killed
==
THD
::
KILL_BAD_DATA
)
)
{
{
error
=
thd
->
is_error
()
?
thd
->
main_da
.
sql_errno
()
:
0
;
error
=
thd
->
is_error
()
?
thd
->
main_da
.
sql_errno
()
:
0
;
...
...
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