List:Commits« Previous MessageNext Message »
From:Sven Sandberg Date:December 4 2007 11:01am
Subject:Re: BUG#12691 - a complementary patch
View as plain text  
Hej Mats,

Patch is cool, but two things to fix. See below.

/Sven


Mats Kindahl wrote:
[...]
> diff -Nru a/mysql-test/t/rpl_slave_skip.test b/mysql-test/t/rpl_slave_skip.test
> --- a/mysql-test/t/rpl_slave_skip.test	2007-12-04 10:31:29 +01:00
> +++ b/mysql-test/t/rpl_slave_skip.test	2007-12-04 10:31:29 +01:00
[...]
> @@ -195,9 +197,131 @@
[...]
> +--echo ==== Try with a big file so that we get an append_block event as well
> +
> +--echo **** On Slave ****
> +connection slave;
> +STOP SLAVE;
> +source include/wait_for_slave_to_stop.inc;
> +
> +--echo **** On Master ****
> +connection master;
> +SET AUTOCOMMIT=1;
> +
> +# This contain about 70 words, so we double it a few times to get more than 2000
> lines
> +SET SQL_LOG_BIN=0;
> +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t4(a) SET b = 'master';
> +INSERT INTO t4 SELECT * FROM t4;
> +INSERT INTO t4 SELECT * FROM t4;
> +INSERT INTO t4 SELECT * FROM t4;
> +INSERT INTO t4 SELECT * FROM t4;
> +INSERT INTO t4 SELECT * FROM t4;
> +INSERT INTO t4 SELECT * FROM t4;
> +INSERT INTO t4 SELECT * FROM t4;
> +SELECT a FROM t4 INTO OUTFILE 'rpl_slave_skip_words.dat';
> +SET SQL_LOG_BIN=1;

You need to double once more, the generated file is only 70 KB and the
limit for splitting into append events is 128 KiB. AFAmysqlbinlog&grepCS
the generated binlog does not contain any append event.

> diff -Nru a/sql/slave.cc b/sql/slave.cc
> --- a/sql/slave.cc	2007-12-04 10:31:29 +01:00
> +++ b/sql/slave.cc	2007-12-04 10:31:29 +01:00
> @@ -3348,7 +3348,9 @@
>        if (rli->slave_skip_counter &&
>            !((type_code == INTVAR_EVENT ||
>               type_code == RAND_EVENT ||
> -             type_code == USER_VAR_EVENT) &&
> +             type_code == USER_VAR_EVENT ||
> +             type_code == BEGIN_LOAD_QUERY_EVENT ||
> +             type_code == APPEND_BLOCK_EVENT) &&

I think it should test for CREATE_FILE_EVENT, too. Not sure how to test
that or if testing is needed (use skozlov's new test-between-versions
framework or check in an old binlog? I had a 4.0 binlog with a
CREATE_FILE_EVENT, attaching it in case it helps).

/Sven



Thread
Re: BUG#12691 - a complementary patchSven Sandberg4 Dec
  • Re: BUG#12691 - a complementary patchMats Kindahl20 Dec
  • Re: BUG#12691 - a complementary patchMats Kindahl20 Dec
    • Re: BUG#12691 - a complementary patchSven Sandberg20 Dec