summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/rpl_insert_id.result5
-rw-r--r--mysql-test/t/rpl_insert_id.test16
-rw-r--r--sql/log.cc4
3 files changed, 24 insertions, 1 deletions
diff --git a/mysql-test/r/rpl_insert_id.result b/mysql-test/r/rpl_insert_id.result
index 8001cb59a35..514ab60dafe 100644
--- a/mysql-test/r/rpl_insert_id.result
+++ b/mysql-test/r/rpl_insert_id.result
@@ -68,3 +68,8 @@ b c
9 13
drop table t1;
drop table t2;
+SET TIMESTAMP=1000000000;
+CREATE TABLE t1 ( a INT UNIQUE );
+SET FOREIGN_KEY_CHECKS=0;
+INSERT INTO t1 VALUES (1),(1);
+Duplicate entry '1' for key 1
diff --git a/mysql-test/t/rpl_insert_id.test b/mysql-test/t/rpl_insert_id.test
index 4c27c03af60..a4506e32963 100644
--- a/mysql-test/t/rpl_insert_id.test
+++ b/mysql-test/t/rpl_insert_id.test
@@ -61,3 +61,19 @@ drop table t2;
save_master_pos;
connection slave;
sync_with_master;
+
+#
+# Bug#8412: Error codes reported in binary log for CHARACTER SET,
+# FOREIGN_KEY_CHECKS
+#
+connection master;
+SET TIMESTAMP=1000000000;
+CREATE TABLE t1 ( a INT UNIQUE );
+SET FOREIGN_KEY_CHECKS=0;
+--error 1062
+INSERT INTO t1 VALUES (1),(1);
+sync_slave_with_master;
+
+
+
+
diff --git a/sql/log.cc b/sql/log.cc
index 8ecc1152d8e..b37d053dfd7 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1737,7 +1737,9 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
}
}
- /* Write the SQL command */
+ /*
+ Write the SQL command
+ */
if (event_info->write(file))
goto err;