Bug #54660 MTR cannot start server properly with non-default innodb_log_file_size
Submitted: 21 Jun 2010 10:11 Modified: 20 Aug 2010 14:45
Reporter: Elena Stepanova Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S7 (Test Cases)
Version:mysql-trunk, mysql-trunk-bugfixing OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any
Tags: regression

[21 Jun 2010 10:11] Elena Stepanova
Description:
If an MTR test is run with a non-default value of innodb_log_file_size, InnoDB plugin fails to start due to InnoDB: Error: log file ./ib_logfile0 is of different size.

System tests are heavily affected.

How to repeat:
Run 
perl  ./mysql-test-run.pl --mysqld=--innodb_log_file_size=8M 1st
[22 Jun 2010 14:06] Elena Stepanova
It is in trunk now (apparently after WL#5349 was pushed into the tree).
[23 Jun 2010 17:57] Elena Stepanova
Same is true for data file size (via innodb_data_file_path).
[24 Jun 2010 11:21] 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/112066

3074 Magne Mahre	2010-06-24
      Bug#54660 MTR cannot start server properly with non-default 
                innodb_log_file_size 
      
      After the implementation of WL#5349, the InnoDB storage
      engine is started earlier in the boot process, and the
      startup parameters that affect file locations and file
      sizes needs to be passed on to the bootstrap process,
      in addition to the database server process.
      
      This patch adds all options that are given to mtr as
      a --mysqld=<option> to the bootstrap command line.
[24 Jun 2010 13:04] Elena Stepanova
The patch does not help if the offending option is given in --defaults-file or in a test's opt file.
[24 Jun 2010 21:19] Elena Stepanova
innodb_log_files_in_group is yet another option that causes the failure
[27 Jun 2010 17:34] Magne Mæhre
I believe someone with deeper knowledge of the MTR world should take this.

Unassigning myself (at least until QA has looked at it)
[19 Jul 2010 8:36] Bjørn Munch
Magne's patch works fine for the explicit --mysqld override. Fixing the problem with settings in --defaults-file is more tricky, as MTR would have to extract the offending options from the file. As for offending options in -opt files, that's not really possible since the bootstrap is done *once* before any test has started.

Do you actually need this for the --defaults-file case or the test-opt file, or would support for --mysqld= be sufficient?
[19 Jul 2010 9:07] Elena Stepanova
We did need it in defaults files for system tests, but system tests are switched to own server startup now, they won't use MTR anymore; other SystemQA tests should be fine with command-line options. So, this task is of no priority for us. 
It's strange however that the problem does not affect the regular suites.
I'm also wondering if it could be solved by just running bootstrap without InnoDB, with MyISAM as a default engine.
[19 Jul 2010 9:15] Bjørn Munch
As far as I can see there are no tests that set those "dangerous" innodb options in their .opt files and so they are not affected.

As for skipping innodb in the bootstrap, that definitely does not work, see Bug #54835.
[19 Jul 2010 9: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/113835

2956 Bjorn Munch	2010-07-19
      Bug #54660 MTR cannot start server properly with non-default innodb_log_file_size
      The option setting must be passed to the boostrap mysqld
      Add any innodb options specified with --mysqld to the boostrap command
[19 Jul 2010 9:31] Elena Stepanova
>> As for skipping innodb in the bootstrap, that definitely does not work, see bug#54835.

I would think it does not work there because the bootstrap only skips InnoDB, without setting MyISAM as a default engine, which creates a conflict.
[20 Jul 2010 7:52] Bjørn Munch
I tried setting default storage engine to myisam in the bootstrap, but that didn't solve any of the cases.
[20 Jul 2010 10:31] Bjørn Munch
Oops sorry, if I also add back setting --loose-skip-innodb for bootstrap, it does seem to fix the problem to also add --default-storage-engine=myisam. Still, it feels kind of "wrong" to not use what is now the default engine during bootstrap.
[28 Jul 2010 11:30] 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/114521

2957 Bjorn Munch	2010-07-28
      Bug #54660 MTR cannot start server properly with non-default innodb_log_file_size
      Pass any --innodb* options to bootstrap as well
      Backported to v1, where also a removal of --loose-skip-innodb is needed
[2 Aug 2010 12:05] Bjørn Munch
Pushed to trunk-mtr, next-mr-mtr
[16 Aug 2010 6:29] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@sun.com-20100816062701-qo9dpnk5tkt1pksb) (version source revid:alik@sun.com-20100816062603-xc16eftmv7rmktyq) (merge vers: 5.6.1-m4) (pib:20)
[16 Aug 2010 6:39] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100816062819-bluwgdq8q4xysmlg) (version source revid:alik@sun.com-20100816062612-enatdwnv809iw3s9) (pib:20)
[16 Aug 2010 17:00] Paul DuBois
Test suite changes. No changelog entry needed.