mariadb/mysql-test/suite
unknown 1626b42ca3 BUG#34768 - nondeterministic INSERT using LIMIT logged in stmt mode if
binlog_format=mixed

Statement-based replication of DELETE ... LIMIT, UPDATE ... LIMIT,
INSERT ... SELECT ... LIMIT is not safe as order of rows is not
defined.

With this fix, we issue a warning that this statement is not safe to
replicate in statement mode, or go to row-based mode in mixed mode.

Note that we may consider a statement as safe if ORDER BY primary_key
is present. However it may confuse users to see very similiar statements
replicated differently.

Note 2: regular UPDATE statement (w/o LIMIT) is unsafe as well, but
this patch doesn't address this issue. See comment from Kristian
posted 18 Mar 10:55.


mysql-test/suite/binlog/r/binlog_stm_ps.result:
  Updated a test case according to fix for BUG#34768:
  INSERT ... SELECT ... LIMIT is now replicated in row mode.
mysql-test/suite/binlog/r/binlog_unsafe.result:
  A test case for BUG#34768.
mysql-test/suite/binlog/t/binlog_unsafe.test:
  A test case for BUG#34768.
sql/sql_delete.cc:
  Statement-based replication of DELETE ... LIMIT is not safe as order of
  rows is not defined, so in mixed mode we go to row-based.
sql/sql_insert.cc:
  Statement-based replication of INSERT ... SELECT ... LIMIT is not safe
  as order of rows is not defined, so in mixed mode we go to row-based.
sql/sql_update.cc:
  Statement-based replication of UPDATE ... LIMIT is not safe as order of
  rows is not defined, so in mixed mode we go to row-based.
2008-03-18 20:25:34 +04:00
..
binlog BUG#34768 - nondeterministic INSERT using LIMIT logged in stmt mode if 2008-03-18 20:25:34 +04:00
bugs Test case for bug#12691 2008-01-31 16:23:27 +03:00
funcs_1 Fixed differences in STATE in result file for bug#34190. 2008-02-06 11:02:45 +01:00
funcs_2 Merge four.local.lan:/WORK2/merge/mysql-5.0-31556 2007-10-18 13:13:21 +02:00
im Move instance manager tests to it's own suite 2007-08-29 19:02:33 +02:00
jp Many files: 2005-01-07 14:32:05 +02:00
large_tests Bug#27029 alter table ... enable keys crashes mysqld on large table 2007-06-21 12:45:56 -04:00
manual manual merge for bug_29136, bug#29309. 2007-10-13 23:12:50 +03:00
ndb Merge witty.:/Users/mattiasj/clones/mysql-5.1-bug31931.2 2008-02-24 16:46:35 +01:00
ndb_team Merge trift2.:/MySQL/M51/mysql-5.1 2008-02-22 16:14:27 +01:00
parts Post push fix 2008-02-25 21:18:50 +01:00
rpl Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines 2008-03-07 13:46:29 -08:00
rpl_ndb Merge quad.:/mnt/raid/alik/MySQL/devel/5.1 2008-02-26 19:34:02 +03:00
stress Merge trift2.:/MySQL/M51/mysql-5.1 2008-02-22 16:14:27 +01:00