Bug #18817 Remove binlog_format from *.opt files
Submitted: 5 Apr 2006 16:51 Modified: 2 Feb 2009 17:10
Reporter: Lars Thalmann Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Replication Severity:S4 (Feature request)
Version:5.1 source OS:Any
Assigned to: Serge Kozlov CPU Architecture:Any
Tags: 51rpl

[5 Apr 2006 16:51] Lars Thalmann
Description:
It is now possible to change the binlog format dynamically using the
binlog_format variable (in 5.1).  Thus we should no longer use the
--binlog-format option in any *.opt files, so these should be removed.

Removing *.opt files make the test suite run faster.

How to repeat:
Look in mysql-test/t/*.opt files

Suggested fix:
I think something like this should work for any test that currently is using 
a file foo.opt to set binlog_format.

-------------------------------------------
File: include/store_binlog_format.inc

let $tmp_stored_binlog_format = `show variables like 'binlog_format'`;
let $stored_binlog_format =
   `select SUBSTRING_INDEX("$tmp_stored_binlog_format", "\\t", -1)`;

-------------------------------------------
File: include/restore_binlog_format.inc

set binlog_format=$stored_binlog_format;

-------------------------------------------
File t/foo.test

--source store_binlog_format.inc
set binlog_format='ROW';

<the test as it looked before>

--source restore_binlog_format.inc
[6 Apr 2006 10:19] Valeriy Kravchuk
Verified just as described with 5.1-BK sources:

openxs@suse:~/dbs/5.1> grep -n -- "--binlog-format" mysql-test/t/*.opt
mysql-test/t/rpl_ndb_2innodb-master.opt:1:--default-storage-engine=ndb --binlog-format=row
mysql-test/t/rpl_ndb_2innodb-slave.opt:1:--innodb --default-storage-engine=innodb --binlog-format=row
mysql-test/t/rpl_ndb_2myisam-master.opt:1:--default-storage-engine=ndb --binlog-format=row
mysql-test/t/rpl_ndb_2myisam-slave.opt:1:--default-storage-engine=myisam --binlog-format=row
mysql-test/t/rpl_ndb_innodb2ndb-master.opt:1:--innodb --binlog-format=row
mysql-test/t/rpl_ndb_innodb2ndb-slave.opt:1:--binlog-format=row --default-storage-engine=ndb
mysql-test/t/rpl_ndb_myisam2ndb-master.opt:1:--binlog-format=row
mysql-test/t/rpl_ndb_myisam2ndb-slave.opt:1:--default-storage-engine=ndb --binlog-format=row
mysql-test/t/rpl_row_err_daisychain-master.opt:1:--binlog-format=row
mysql-test/t/rpl_row_err_daisychain-slave.opt:1:--binlog-format=statement --log-slave-updates

ChangeSet@1.2292, 2006-04-05 14:00:54-07:00
[10 Apr 2006 8:44] Brian Aker
Issue warnings in one version, and then just remove in the next.
[13 Aug 2008 19:14] 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/51554

2676 Serge Kozlov	2008-08-13
      Bug#18817, removing --binlog-format option from .opt files
[13 Aug 2008 19:18] 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/51556

2676 Serge Kozlov	2008-08-13
      Bug#18817, removing --binlog-format option from .opt files
[14 Aug 2008 7:17] 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/51600

2677 He Zhenxing	2008-08-14 [merge]
      Merge with mysql-5.1-rpl-testfixes
[14 Aug 2008 8:19] 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/51605

2685 He Zhenxing	2008-08-14 [merge]
      Merge 5.1-rpl-testfixes -> 6.0-rpl-testfixes
[15 Aug 2008 2:01] 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/51688

2769 He Zhenxing	2008-08-15 [merge]
      Merge 6.0-rpl-testfixes -> 6.0
[19 Aug 2008 19:52] Bugs System
Pushed into 6.0.7-alpha  (revid:skozlov@mysql.com-20080813191251-r9jtrgs2vlvauoq1) (version source revid:sven@mysql.com-20080818175803-c1nutd5773r6b4gd) (pib:3)
[28 Aug 2008 20:14] Bugs System
Pushed into 6.0.7-alpha  (revid:cbell@mysql.com-20080822132131-uveo6wiuecy6m2b8) (version source revid:cbell@mysql.com-20080822132131-uveo6wiuecy6m2b8) (pib:3)
[14 Sep 2008 4:23] Bugs System
Pushed into 6.0.7-alpha  (revid:skozlov@mysql.com-20080813191251-r9jtrgs2vlvauoq1) (version source revid:hakan@mysql.com-20080721095625-h2pyxb88uwtjeavf) (pib:3)
[2 Feb 2009 17:10] Jon Stephens
Test case change only, no end-user changes to document. Closed without further action.