Bug #18698 Change test suite to switch binlog format on-the-fly when needed
Submitted: 31 Mar 2006 18:56 Modified: 8 Feb 2011 11:23
Reporter: Chad MILLER Email Updates:
Status: Won't fix Impact on me:
Category:MySQL Server: Tests Severity:S4 (Feature request)
Version: OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any

[31 Mar 2006 18:56] Chad MILLER
We needn't stop  and restrart the servers any more to test the different binlog formats.  If we run each test twice in series, switch formats each time, then we can cover our tests much faster.

How to repeat:

Suggested fix:
-------- Original Message --------
Subject: Re: Proposal: speedup make test by merging --ps-protocol and conv. mode
Date: Fri, 31 Mar 2006 20:30:17 +0200
From: Mats Kindahl <mats@mysql.com>
To: Konstantin Osipov <konstantin@mysql.com>
CC: dev-public@mysql.com
References: <20060330223336.GH11138@dragonfly.local>

> Konstantin Osipov wrote:
> Hello team,
> We could speed up our test suite by running a given test in
> --ps-protocol mode (in 5.1 and later additionally in --binlog-format=row)
> immediately after the conventional mode. This should save us
> a lot of extra bootstraps. The feature can be implemented as a separate
> mode of mysql-test-run, or as an extension to the standard mode.
> I would expect the performance gain to be at lest 50%.

Hello Konstantin!

It can be done now since Guilhem implemented a server variable to change
binlog format on-the-fly.

set binlog_format=row            will switch to use row-based

set binlog_format=statement   will switch to use statement-based

set binlog_format=mixed        will use statement-based logging but
switch to row-based for certain "complicated" situations.

Best wishes,
Mats Kindahl
[31 Mar 2006 19:02] MySQL Verification Team
Thank you for the bug report.
[7 Oct 2008 19:05] Magnus Blåudd
Generic functionality to try to switch from one way mysqld is started to another is implemented in new mtr.pl but still not activated(it need to be debugged). if the "switch of settings" does not work -> restart.

This give a speedup when running only a few tests, but for the whole test suite the gain is very small.
[24 Oct 2008 10:28] Magnus Blåudd
Sven, you be the judge if this is done or not?
[31 Oct 2008 17:27] Sven Sandberg
As I understand the bug report, there was a time (before when I was hired :-) when tests used .opt files to switch binlog format. Now, mtr runs each test in the rpl suite in all three modes, and tests that want a specific binlog format do "source include/have_binlog_format_X.inc".
Setting to "can't repeat".
[31 Oct 2008 17:36] Sven Sandberg
Hmm, I think I misunderstood the bug, sorry. The question is whether switching can be done by setting dynamic variables instead of by command line options (which requires restarting the server).

This does not seem to be implemented. E.g.:

./mtr  rpl_timezone rpl_udf
rpl.rpl_udf 'stmt'                       [ pass ]   2082
rpl.rpl_udf 'row'                        [ pass ]    846
rpl.rpl_udf 'mix'                        [ pass ]    425
rpl.rpl_timezone 'row'                   [ pass ]    375
rpl.rpl_timezone 'stmt'                  [ pass ]    238
rpl.rpl_timezone 'mix'                   [ pass ]    241
rpl.rpl_user 'row'                       [ pass ]    125
rpl.rpl_user 'stmt'                      [ pass ]     92
rpl.rpl_user 'mix'                       [ pass ]    773
The servers were restarted 7 times

In this case, it used two parallel threads to execute the tests, so the servers were "started" 2 times and "restarted" 7 times: one server start per test execution.

Setting back to verified.
[8 Feb 2011 11:23] Bjørn Munch
Changing this on the fly will mess up the test ordering that mtr now does to reduce the amounts of restarts. It might be possible to do this too but it would add to the existing complexity. Also, the benefit would be limited for longer test runs where smart ordering already reduces the number of restarts.