Bug #39812 Make statement replication default for 5.1 (to match 5.0)
Submitted: 2 Oct 2008 16:10 Modified: 17 Oct 2008 20:07
Reporter: Georgi Kodinov
Status: Closed
Category:Server: Replication Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to: Georgi Kodinov Target Version:5.1.29
Triage: Triaged: D1 (Critical)

[2 Oct 2008 16: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 14: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 20: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 19: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 20:34] Paul DuBois
Setting report to NDI pending push into 6.0.x.
[14 Oct 2008 3: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 10: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 18: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 20:07] Paul DuBois
Noted in 6.0.8 changelog.
[22 Oct 2008 12: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 12: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 14: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 15: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 15: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 15: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 16: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 16: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 13: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 2: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 22: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 23: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 10: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 10: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 11: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 22: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)
[22 Nov 2008 0: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 15: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)