Bug #39812 Make statement replication default for 5.1 (to match 5.0)
Submitted: 2 Oct 2008 14:10 Modified: 21 Jun 2010 0:57
Reporter: Georgi Kodinov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to: Georgi Kodinov CPU Architecture:Any

[2 Oct 2008 14:10] Georgi Kodinov
Description:
Make the statement based replication default in 5.1. Currently it's MIXED mode, but we need to keep 5.1 compatible to 5.0.

How to repeat:
start the server

Suggested fix:
Make the statement based replication default in 5.1.
But add a config file option to switch to mixed replication for new 5.1 installations
[3 Oct 2008 12:25] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/55245

2757 Georgi Kodinov	2008-10-03
      Bug #39812: Make statement replication default for 5.1 (to match 5.0)
      
      Make STMT replication default for 5.1.
      Add a default of MIXED into the config files
      Fix the tests that needed MIXED replication mode.
[7 Oct 2008 18:43] Paul DuBois
Noted in 5.1.29 changelog.

Incompatible change:
The default binary logging mode has been changed from MIXED to
STATEMENT for compatibility with MySQL 5.0.

Leaving report status unchanged; this is early documentation of an upcoming push into 5.1.29.
[9 Oct 2008 17:54] Bugs System
Pushed into 5.1.30  (revid:kgeorge@mysql.com-20081003122419-kjg2ytd3iu93xsxx) (version source revid:kgeorge@mysql.com-20081003122419-kjg2ytd3iu93xsxx) (pib:4)
[9 Oct 2008 18:34] Paul DuBois
Setting report to NDI pending push into 6.0.x.
[14 Oct 2008 1:38] Baron Schwartz
So if I understand it right, you're effectively turning off the benefits of RBL for people unless they really want it.

I don't understand the rationale for this, and it seems to me it deserves a little more explanation, instead of just "we're changing this."

Users who want downwards compatibility with 5.0 can just change the logging format to STATEMENT.

This also doesn't make 5.1 "compatible" with 5.0.  I can't just change logging format to STATEMENT and expect to hook a 5.0 slave up to a 5.1 master -- it's just not that simple.

I'm not arguing that this is a good or bad change, just that it might need a little explanation.
[14 Oct 2008 8:38] Giuseppe Maxia
Baron,
The rationale for this change is that MIXED mode as default will break existing applications, where statements like the following are used:
UPDATE t1 SET a=1 WHERE @@server_id = 1;
INSERT INTO t1 (origin, val) @@server_id , 1;

We know that several users are exploiting the quirks of STATEMENT based replication to their advantage. So we decided that it was safer not to force MIXED mode on users who are upgrading.
Instead, we added MIXED mode to the option files templates, to encourage new users to start with MIXED mode.

We are very eager to boost the adoption of MIXED base replication, but we are also concerned about mismatches and would like to avoid unpleasant surprises for users who switch from 5.0 to 5.1.

About replicating from 5.1 to 5.0 servers, this has never been a goal. The manual warns explicitly against using lesser versions for slave servers, and the rationale of this change has nothing to share with mixed versions usage. 
http://dev.mysql.com/doc/refman/5.1/en/replication-compatibility.html

Hope this clarifies the matter.
[17 Oct 2008 16:42] Bugs System
Pushed into 6.0.8-alpha  (revid:kgeorge@mysql.com-20081003122419-kjg2ytd3iu93xsxx) (version source revid:kgeorge@mysql.com-20081007153644-uypi14yjgque9obc) (pib:5)
[17 Oct 2008 18:07] Paul DuBois
Noted in 6.0.8 changelog.
[22 Oct 2008 10:46] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/56794

2683 Sven Sandberg	2008-10-22
      BUG#39812: Make statement replication default for 5.1 (to match 5.0)
      Adding test case.
[22 Oct 2008 10:50] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/56797

2773 Sven Sandberg	2008-10-22
      BUG#39812: Make statement replication default for 5.1 (to match 5.0)
      Adding test case.
[22 Oct 2008 12:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/56805

2773 Sven Sandberg	2008-10-22
      BUG#39812: Make statement replication default for 5.1 (to match 5.0)
      Added test case to check the default value of @@binlog_format.
[22 Oct 2008 13:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/56815

2771 Sven Sandberg	2008-10-22
      BUG#39812: Make statement replication default for 5.1 (to match 5.0)
      Added test case to check the default value of @@binlog_format.
[22 Oct 2008 13:55] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/56817

2875 Sven Sandberg	2008-10-22
      BUG#39812: Make statement replication default for 5.1 (to match 5.0)
      Reverted default binlog format in 6.0 to MIXED. It should default to
      STATEMENT only in 5.1.
[22 Oct 2008 13:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/56819

2771 Sven Sandberg	2008-10-22
      BUG#39812: Make statement replication default for 5.1 (to match 5.0)
      Added test case to check the default value of @@binlog_format.
[22 Oct 2008 14:07] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/56822

2876 Sven Sandberg	2008-10-22 [merge]
      Merged test case for BUG#39812 from 5.1-5.1.29-rc to 6.0-5.1.29-rc, and
      changed the expected default binlog format in the result file to MIXED.
[22 Oct 2008 14:44] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/56826

2773 Sven Sandberg	2008-10-22 [merge]
      Merged new test case for BUG#39812 to the head of 5.1
[23 Oct 2008 11:57] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/56880

2739 Alexander Nozdrin	2008-10-23 [merge]
      Merged from 6.0-5.1.29-rc up to revno:2876 -- Sven's fix & test case for Bug#39812
[24 Oct 2008 0:48] Bugs System
Pushed into 6.0.8-alpha  (revid:alik@mysql.com-20081023115708-yjk6jrqnht6zwope) (version source revid:alik@mysql.com-20081023115708-yjk6jrqnht6zwope) (pib:5)
[28 Oct 2008 21:02] Bugs System
Pushed into 5.1.29-ndb-6.2.17  (revid:kgeorge@mysql.com-20081003122419-kjg2ytd3iu93xsxx) (version source revid:tomas.ulin@sun.com-20081028140209-u4emkk1xphi5tkfb) (pib:5)
[28 Oct 2008 22:21] Bugs System
Pushed into 5.1.29-ndb-6.3.19  (revid:kgeorge@mysql.com-20081003122419-kjg2ytd3iu93xsxx) (version source revid:tomas.ulin@sun.com-20081028194045-0353yg8cvd2c7dd1) (pib:5)
[1 Nov 2008 9:46] Bugs System
Pushed into 5.1.29-ndb-6.4.0  (revid:kgeorge@mysql.com-20081003122419-kjg2ytd3iu93xsxx) (version source revid:jonas@mysql.com-20081101082305-qx5a1bj0z7i8ueys) (pib:5)
[4 Nov 2008 9:20] Bugs System
Pushed into 5.1.30  (revid:sven@mysql.com-20081022144529-ehrjz5iv6eoqoe56) (version source revid:mats@sun.com-20081103175049-ulv24ke1m2lpi632) (pib:5)
[10 Nov 2008 10:51] Bugs System
Pushed into 6.0.8-alpha  (revid:sven@mysql.com-20081022144529-ehrjz5iv6eoqoe56) (version source revid:davi.arnaut@sun.com-20081024142954-k0uqv2e2hzcta51f) (pib:5)
[21 Nov 2008 21:02] Bugs System
Pushed into 5.1.30-ndb-6.2.17  (revid:sven@mysql.com-20081022144529-ehrjz5iv6eoqoe56) (version source revid:tomas.ulin@sun.com-20081121161314-jhz3twf5xjt8stnh) (pib:5)
[21 Nov 2008 23:45] Bugs System
Pushed into 5.1.30-ndb-6.3.20  (revid:sven@mysql.com-20081022144529-ehrjz5iv6eoqoe56) (version source revid:tomas.ulin@sun.com-20081121210644-zas6e9wa5kuj7d6f) (pib:5)
[27 Nov 2008 14:52] Bugs System
Pushed into 5.1.30-ndb-6.4.0  (revid:sven@mysql.com-20081022144529-ehrjz5iv6eoqoe56) (version source revid:tomas.ulin@sun.com-20081126125835-5sohkzk2jjwpq1wp) (pib:5)
[5 May 2010 15:03] Bugs System
Pushed into 5.1.47 (revid:joro@sun.com-20100505145753-ivlt4hclbrjy8eye) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[6 May 2010 10:18] Jon Stephens
Already documented behaviour change for 5.1.29; no new changelog entries needed.

Note that this fix was not to be applied in >5.1, and the 6.0.8 changelog entry noted previously has already been removed.

Closed.
[28 May 2010 5:53] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:22] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 6:50] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[29 May 2010 15:04] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[15 Jun 2010 8:08] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100615080459-smuswd9ooeywcxuc) (version source revid:mmakela@bk-internal.mysql.com-20100415070122-1nxji8ym4mao13ao) (merge vers: 5.1.47) (pib:16)
[15 Jun 2010 8:24] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100615080558-cw01bzdqr1bdmmec) (version source revid:mmakela@bk-internal.mysql.com-20100415070122-1nxji8ym4mao13ao) (pib:16)
[17 Jun 2010 11:53] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:31] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:19] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)