summaryrefslogtreecommitdiff
path: root/mysql-test/include/commit.inc
diff options
context:
space:
mode:
authorAlfranio Correia <alfranio.correia@oracle.com>2011-01-28 12:09:15 +0000
committerAlfranio Correia <alfranio.correia@oracle.com>2011-01-28 12:09:15 +0000
commit8ce9b992462f0d2ef5e435e4ecda4700fa7db652 (patch)
treeb8f2fa4b3142b8ae4769837d3fea7cb2af76cfc9 /mysql-test/include/commit.inc
parent9c2370c25adc30c5fae8ad8854b401275b033210 (diff)
downloadmariadb-git-8ce9b992462f0d2ef5e435e4ecda4700fa7db652.tar.gz
BUG#59338 Inconsistency in binlog for statements that don't change any rows STATEMENT SBR
In SBR, if a statement does not fail, it is always written to the binary log, regardless if rows are changed or not. If there is a failure, a statement is only written to the binary log if a non-transactional (.e.g. MyIsam) engine is updated. INSERT ON DUPLICATE KEY UPDATE and INSERT IGNORE were not following the rule above and were not written to the binary log, if then engine was Innodb. mysql-test/extra/rpl_tests/rpl_insert_duplicate.test: Added test case. mysql-test/extra/rpl_tests/rpl_insert_ignore.test: Updated test case. mysql-test/include/commit.inc: Updated test case as the calls to the binary log have changed for INSERT ON DUPLICATE and INSERT IGNORE. mysql-test/r/commit_1innodb.result: Updated result file. mysql-test/suite/rpl/r/rpl_insert_duplicate.result: Added test case. mysql-test/suite/rpl/r/rpl_insert_ignore.result: Updated result file. mysql-test/suite/rpl/t/rpl_insert_duplicate.test: Added test case. mysql-test/suite/rpl/t/rpl_insert_ignore.test: Improved test case.
Diffstat (limited to 'mysql-test/include/commit.inc')
-rw-r--r--mysql-test/include/commit.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc
index d412eae8364..7924f9bc96f 100644
--- a/mysql-test/include/commit.inc
+++ b/mysql-test/include/commit.inc
@@ -502,16 +502,16 @@ call p_verify_status_increment(2, 2, 2, 2);
--echo # 12. Read-write statement: IODKU, change 0 rows.
--echo #
insert t1 set a=2 on duplicate key update a=2;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 2, 1, 0);
commit;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 2, 1, 0);
--echo # 13. Read-write statement: INSERT IGNORE, change 0 rows.
--echo #
insert ignore t1 set a=2;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 2, 1, 0);
commit;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 2, 1, 0);
--echo # 14. Read-write statement: INSERT IGNORE, change 1 row.
--echo #