← Back to team overview

maria-developers team mailing list archive

START ALTER replication test cases

 

Hi Sachin, Andrei,

I'm looking at test cases for START ALTER / Lag-free Alter on Slave. And I
happened to notice something in test case rpl.rpl_start_alter_bugs:

  --connection master
  set global binlog_alter_two_phase=true;
  # ...
  ALTER  TABLE t1 DROP PRIMARY KEY;
  ALTER  TABLE t1 ADD UNIQUE KEY ui (i);
  ALTER  TABLE t1 ADD PRIMARY KEY (i);

Note the set *global* binlog_alter_two_phase. This will not affect the
testcase at all, as the ALTER TABLE queries are using the *session* value
(which defaults to false).

This can be verified by checking the binlog after running the testcase,
mysql-test/var/mysqld.1/data/master-bin.000001 . It has only normal ALTER
TABLE query events, no START ALTER / COMMIT ALTER.

So it looks strange that a start_alter test doesn't use START ALTER, and I
just wanted to point this out to you in case it is a mistake and maybe the
test coverage of START ALTER is less than intended? A quick grep shows
similar SET GLOBAL in other start_alter tests, but I did not investigate if
they have the same issue.

Hope this helps,

 - Kristian.


Follow ups