Bug #46043 mysqld --skip-innodb does not skip InnoDB
Submitted: 8 Jul 2009 15:21 Modified: 1 Aug 2010 22:30
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1-bzr OS:Solaris (solaris 64bit and OS X PPC)
Assigned to: Kristofer Pettersson CPU Architecture:Any

[8 Jul 2009 15:21] Guilhem Bichot
Description:
./mysql --bootstrap --loose-skip-innodb
still starts innodb, which is the bug. Same without "loose".

I don't know if this is dependent on --bootstrap.
I see it by downloading the tar.gz of "mysql-test/" from pushbuild2 for Solaris Sparc64 and Mac OS X PPC, and looking at var/log/bootstrap.log:
- in the latest 5.1 (ok, one revision before the latest, because the latest hasn't finished testing):
/export/home/pb2/test/sb_1-586691-1245158895.83/mysql-5.1.37-solaris10-sparc-test/libexec/mysqld --no-defaults --bootstrap --basedir=/export/home/pb2/test/sb_1-586691-1245158895.83/mysql-5.1.37-solaris10-sparc-test --datadir=/export/home/pb2/test/sb_1-586691-1245158895.83/mysql-5.1.37-solaris10-sparc-test/mysql-test/var/install.db --loose-skip-innodb --loose-skip-falcon --loose-skip-ndbcluster --tmpdir=/export/home/pb2/test/sb_1-586691-1245158895.83/mysql-5.1.37-solaris10-sparc-test/mysql-test/var/tmp/ --core-file --language=/export/home/pb2test/sb_1-586691-1245158895.83/mysql-5.1.37-solaris10-sparc-test/share/mysql/english --character-sets-dir=/export/home/pb2/test/sb_1-586691-1245158895.83/mysql-5.1.37-solaris10-sparc-test/share/mysql/charsets
090616 19:39:14 [Note] Plugin 'FEDERATED' is disabled.
090616 19:39:14 [Note] Plugin 'ndbcluster' is disabled.
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
090616 19:39:14  InnoDB: Setting file ./ibdata1 size to 10 MB
- in the latest azalea too.

This affects solaris 10 sparc64 and Mac OS X PPC, not any other platform so far.
It is a problem because with summit (soon coming into azalea), there are two changes:
- the default value of innodb_log_file_size is 128MB
- the testsuite uses innodb_log_file_size=32MB (this difference with the default is the key new factor for this bug)
- so when running an innodb test with mtr, first the boostrap, failing to skip innodb, runs with default values (128MB), then the innodb test specifies 32MB, and InnoDB says "sorry, I found a log file of size 128MB, this size does not match the 32MB you're asking for". Actually it says:
InnoDB: Error: log file ./ib_logfile0 is of different size 0 134217728 bytes
InnoDB: than specified in the .cnf file 0 33554432 bytes!
090708  2:03:23 [ERROR] Plugin 'InnoDB' init function returned error.
and innodb fails to start, all following tests fail.

How to repeat:
log into solaris 10 sparc64, grab a build from pushbuild2, do something like:

 /home/gb221825/sol10sparc64/mysql-5.4.4-alpha/sql/mysqld --no-defaults --bootstrap --basedir=/home/gb221825/sol10sparc64/mysql-5.4.4-alpha --datadir=/home/gb221825/sol10sparc64/mysql-5.4.4-alpha/mysql-test/var/install.db --skip-innodb --loose-skip-ndbcluster --tmpdir=/home/gb221825/sol10sparc64/mysql-5.4.4-alpha/mysql-test/var/tmp/ --core-file --language=/home/gb221825/sol10sparc64/mysql-5.4.4-alpha/sql/share/english --character-sets-dir=/home/gb221825/sol10sparc64/mysql-5.4.4-alpha/sql/share/charsets

and you will see InnoDB starting, which is wrong.

Suggested fix:
Happens only on those CPUs which, if I remember correctly, are big-endian. I don't know if that's a good hint or not.
[8 Jul 2009 16:16] Guilhem Bichot
Bug is independent of --bootstrap:
[gb221825@takk-z3]~/sol10sparc64/mysql-5.1.37-solaris10-sparc/libexec: ./mysqld --skip-networking --skip-grant-tables --datadir=./tmp --language=../share/mysql/english --skip-innodb 
090708 18:12:27 [Note] Plugin 'FEDERATED' is disabled.
090708 18:12:27 [Note] Plugin 'ndbcluster' is disabled.
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!

This makes the bug more likely to affect users.
And it plagues the testsuite of the summit->azalea merge's testsuite.

By the way there is this old bug report
BUG#41010 - enum-style command-line options are not honoured 
which is also about plugin option handling, and which is specific of 64-bit big-endian...
Maybe it would be time to look into both bugs.
[9 Jul 2009 11:56] Guilhem Bichot
I verified the bug with the latest 5.1:
joro@sun.com-20090708131116-kyz8iotbum8w9yic

so the bug is not cured by

        revision-id: kristofer.pettersson@sun.com-20090625135526-pn1mqv48st28qe3z
        timestamp: Thu 2009-06-25 15:55:26 +0200
        message:
          Bug#45336 --enable-foobar doesn't work for any plugin foobar.
          
          Because of a regression introduced by bug#19027 the option --enable-foobar
          doesn't work anymore for any plugin 'foobar'. The reason is that plugin
          names are tristate options variables with optional parameters and integer
          values are not accepted. Since the 'enable' prefix attempts to assign '1'
          to the option the operation fails.
          
          This patch translates any number n assigned to a plugin variable of type ENUM
          to be the corresponding enumerated item. As a side effect --enable-foobar and
          --disable-foobar will also start working again.

I notice that skip-innodb does not work (innodb is not skipped) but
innodb=OFF works (innodb is skipped). However according to the comments in BUG#19027, skip-innodb should work: "--disable-plugin_name and --skip-plugin_name are still supported and are the same as --plugin_name=OFF",
so it's a bug that skip-innodb does not work.
[6 Nov 2009 16:09] 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/89631

3189 Kristofer Pettersson	2009-11-06
      Bug#46043 mysqld --skip-innodb does not skip InnoDB
      
      The prefix --skip- didn't work on 64 bit big endian machines
      because of how the value pointer was casted.
[9 Nov 2009 10:48] 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/89761

3189 Kristofer Pettersson	2009-11-09
      Bug#46043 mysqld --skip-innodb does not skip InnoDB
           
      The prefix --skip- didn't work on 64 bit big endian machines
      because of how the value pointer was casted.
     @ mysys/my_getopt.c
        * Split if-statement; The value pointer must correspond to the type mask or it will break on big endian platforms.
[9 Nov 2009 22:29] 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/89867

3189 Kristofer Pettersson	2009-11-09
      Bug#46043 mysqld --skip-innodb does not skip InnoDB
        
      The prefix --skip- didn't work on 64 bit big endian machines
      because of how the value pointer was casted.
     @ mysys/my_getopt.c
        * Use the interface! The value pointer must correspond to the type mask or it will break on big endian platforms.
[2 Dec 2009 8:20] Georgi Kodinov
Pushed into 5.1.42
[10 Dec 2009 2:26] Paul DuBois
Noted in 5.1.42 changelog.

On 64-bit systems, --skip-innodb did not skip InnoDB startup. 

Setting report to NDI pending push to 5.5.x+.
[16 Dec 2009 8:41] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091216083311-xorsasf5kopjxshf) (version source revid:alik@sun.com-20091214191830-wznm8245ku8xo702) (merge vers: 6.0.14-alpha) (pib:14)
[16 Dec 2009 16:23] Paul DuBois
Noted in 6.0.14 changelog.

Setting report to NDI pending push to 5.5.x.
[22 Dec 2009 2:04] Davi Arnaut
Bug#49851 has been closed as a duplicate of this one
[1 Aug 2010 22:31] Paul DuBois
Noted in 5.5.0 changelog.