Bug #41010 enum-style command-line options are not honoured (maria.maria-recover fails)
Submitted: 25 Nov 2008 13:14 Modified: 22 Apr 2010 23:43
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:6.0-bzr OS:Solaris (sparc64)
Assigned to: CPU Architecture:Any
Tags: pb2, test failure

[25 Nov 2008 13:14] Guilhem Bichot
Description:
Given an engine of name X which has a variable named Y of type MYSQL_SYSVAR_ENUM,
starting mysqld with command-line option --X-Y=# has no effect: it apparently does not change the value of Y, as SHOW VARIABLES still shows the default value.
This affects the EXAMPLE engine and the Maria engine, which are the only two engine so far making use of MYSQL_SYSVAR_ENUM variables. It is a Server bug and not an engine bug. The two engines are respecting the storage engine API.

How to repeat:
Testcase for the Maria engine is starting mysqld with --maria-recover=backup and then doing SELECT @@global.maria_recover: it still says "OFF" (the default) instead of "BACKUP" (seen in pushbuild2, see URL in private post).

Testcase for the EXAMPLE engine is:
- make sure to have a build with --with-example-storage-engine
- start mysqld (I use the command-line provided by "./mtr --script-debug alias")
- run this SQL:
    install plugin example soname "ha_example.so";
- shut down mysqld
- restart mysqld but with --example-enum-var=e2
- verify that EXAMPLE is available, using:
    SHOW ENGINES
- then do
    show variables like "example%"
it will tell that example_enum_var is "e1" (its default value): the setting to "e2" was ignored (though "e2" is a valid value, see storage/example/ha_example.cc).

Following the same steps shows no bug under Linux 32 bits:
mysql> show variables like "example%";
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| example_enum_var  | e2    |

Suggested fix:
Hint: we see this failure on solaris sparc64, and also on PA-RISC64, Itanium64, s390, powerpc64. So it is 64-bit specific and maybe has to do with endianness (no problem on Linux 64).
[19 Feb 2009 12:13] Alexander Nozdrin
Bug#42981 is a duplicate of this one.
[2 Mar 2009 14:02] Guilhem Bichot
As this is seen in pb2, I'm asking for a re-triage.
[18 Mar 2009 8:48] Guilhem Bichot
Hi Omer. It is a recurrent failure on pb2 (maria-recover always fails in all 6.0 trees for Solaris SPARC 64bit machines) and has been reported 3 months ago. I thought this is the kind of bug which should get a dev assigned right away. So I asked for re-triage.
[28 May 2009 11:39] Guilhem Bichot
Maria isn't in 5.4, but any engine making use of enum-style command options will be affected. If there is any such engine plugging into 5.4 (community engines?), they will be affected.
[6 Mar 2010 10:51] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@fedora12-20091225154921-x25a5pyw1pxiwobv) (merge vers: 5.5.99) (pib:16)
[22 Apr 2010 23:43] Paul Dubois
Noted in 5.5.3 changelog.

Command-line options for enumeration-type plugin variables were not
honored.