Bug #45336 --enable-foobar doesn't work for any plugin foobar.
Submitted: 4 Jun 2009 17:22 Modified: 21 Jul 2009 18:26
Reporter: Kristofer Pettersson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: Kristofer Pettersson CPU Architecture:Any

[4 Jun 2009 17:22] Kristofer Pettersson
Description:
This is a regression introduced by bug#19027. Since all plugin names now are tristate options with optional parameters integer values are not accepted. Since the 'enable' prefix attempts to assign '1' to the option the operation fails.

How to repeat:
Start server with the 'enable' prefix attached to any plugin: --enable-innodb.

Suggested fix:
Allow for my_getopt() to assign '1' to the option variable and interpret this as the second enumerated item if the option is of type ENUM.

This makes --enable-innodb equivalent to --innodb=ON
[25 Jun 2009 13:05] 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/77191

2968 Kristofer Pettersson	2009-06-25
      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.
     @ mysys/my_getopt.c
        * setval now accepts integer values for option variables of type ENUM.
[25 Jun 2009 13:41] 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/77204

2968 Kristofer Pettersson	2009-06-25
      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.
     @ mysys/my_getopt.c
        * setval now accepts integer values for option variables of type ENUM.
[25 Jun 2009 13:55] 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/77208

2968 Kristofer Pettersson	2009-06-25
      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.
     @ mysys/my_getopt.c
        * setval now accepts integer values for option variables of type ENUM.
[8 Jul 2009 13:30] Bugs System
Pushed into 5.1.37 (revid:joro@sun.com-20090708131116-kyz8iotbum8w9yic) (version source revid:staale.smedseng@sun.com-20090626084621-g6zteyvzehto95j0) (merge vers: 5.1.37) (pib:11)
[9 Jul 2009 7:37] Bugs System
Pushed into 5.1.37 (revid:joro@sun.com-20090708131116-kyz8iotbum8w9yic) (version source revid:staale.smedseng@sun.com-20090626084621-g6zteyvzehto95j0) (merge vers: 5.1.37) (pib:11)
[10 Jul 2009 11:20] Bugs System
Pushed into 5.4.4-alpha (revid:anozdrin@bk-internal.mysql.com-20090710111017-bnh2cau84ug1hvei) (version source revid:kristofer.pettersson@sun.com-20090625140938-71da252h1fs7mmyx) (merge vers: 5.4.4-alpha) (pib:11)
[21 Jul 2009 18:26] Paul DuBois
Noted in 5.1.37 changelog.

Bug#19027 caused --enable-plugin_name (for example, --enable-innodb)
not to work. 

Did not add to 5.4.4 changelog because Bug#19027 was also in 5.4.4 and thus the problem does not occur in any released version.
[12 Aug 2009 21:50] Paul DuBois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[14 Aug 2009 22:47] Paul DuBois
Ignore previous comment about 5.4.2.
[26 Aug 2009 13:46] Bugs System
Pushed into 5.1.37-ndb-7.0.8 (revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[26 Aug 2009 13:46] Bugs System
Pushed into 5.1.37-ndb-6.3.27 (revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (version source revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (merge vers: 5.1.37-ndb-6.3.27) (pib:11)
[26 Aug 2009 13:48] Bugs System
Pushed into 5.1.37-ndb-6.2.19 (revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (version source revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (merge vers: 5.1.37-ndb-6.2.19) (pib:11)
[27 Aug 2009 16:32] Bugs System
Pushed into 5.1.35-ndb-7.1.0 (revid:magnus.blaudd@sun.com-20090827163030-6o3kk6r2oua159hr) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)