Bug #44479 mysql-test-run does not detect that external server has Innodb support
Submitted: 25 Apr 2009 23:31 Modified: 18 Dec 2009 20:46
Reporter: Elena Stepanova Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.1.34 OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any

[25 Apr 2009 23:31] Elena Stepanova
Description:
If a server was started with InnoDB support, running tests which contain '--source include/have_innodb.inc' using 'MTR --extern ...' does not work -- the tests get skipped with reason 'No innodb support'.

There was a bug#35482 about exactly the same problem, closed in 5.1.32 saying that a patch was pushed.
The problem still exists in 5.1.34. 

To get configuration of the external server, MTR calls subroutine collect_mysqld_features_from_running_server which executes 'SHOW VARIABLES', parses the result set, and populates configuration hash. Later, if it finds a hash element 'innodb' with true value, it considers that InnoDB support is ON, and OFF otherwise.

However, there is no such variable, innodb is an option only; so, the hash element does not get the desired value.

In normal flow, without --extern, MTR collects command-line variables, and 'innodb' element is initialized properly.

How to repeat:
perl ./mysql-test-run.pl --start --mysqld=--innodb
# (or perl ./mysql-test-run.pl --start-and-exit --mysqld=--innodb for MTR_VERSION=1)
perl ./mysql-test-run.pl --extern <extern connection parameters> innodb_handler
# (or any other test which sources include/have_innodb.inc)

Suggested fix:
In 5.0 pre-check in MTR for innodb and similar parameters is slightly different -- it checks that the hash element value is not equal 'FALSE' (rather than checking that it equals 'TRUE'). Empty elements pass the 'not equal' check, and the rest is done by mysqltest. 
If it is too difficult to implement a more accurate check in MTR, maybe it makes sense to return to the old approach.
[4 Aug 2009 13:28] 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/80022

2811 Bjorn Munch	2009-08-04
      Bug #44479 mysql-test-run does not detect that external server has Innodb support
      Variable name mismatch
      Map variable have_innodb=YES to innodb=ON
[11 Aug 2009 11:00] 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/80560

2813 Bjorn Munch	2009-08-11
      Bug #44479 mysql-test-run does not detect that external server has Innodb support
      Variable name mismatch
      Map variable have_innodb=YES to innodb=ON
[11 Aug 2009 11:08] Bjørn Munch
Pushed to azalea-mtr and 5.1-mtr
[3 Sep 2009 17:12] Bugs System
Pushed into 5.1.40 (revid:bjorn.munch@sun.com-20090903170735-679d64zp580wl39j) (version source revid:bjorn.munch@sun.com-20090903170735-679d64zp580wl39j) (merge vers: 5.1.40) (pib:11)
[4 Sep 2009 0:45] Paul DuBois
Test suite change. No changelog entry needed.

Setting report to NDI pending push into 5.4.x.
[30 Sep 2009 8:18] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20090929093622-1mooerbh12e97zux) (version source revid:alik@sun.com-20090922182109-vs5ign07cwht12z6) (merge vers: 6.0.14-alpha) (pib:11)
[30 Sep 2009 8:20] Bugs System
Pushed into 5.4.5-beta (revid:alik@sun.com-20090925094254-tjl9eajkzwzgthoe) (version source revid:alik@sun.com-20090922142453-x275o41whpyezh4q) (merge vers: 5.4.4-beta) (pib:11)
[30 Sep 2009 19:45] Paul DuBois
Test suite change. No changelog entry needed.
[18 Dec 2009 10:34] Bugs System
Pushed into 5.1.41-ndb-7.1.0 (revid:jonas@mysql.com-20091218102229-64tk47xonu3dv6r6) (version source revid:jonas@mysql.com-20091218095730-26gwjidfsdw45dto) (merge vers: 5.1.41-ndb-7.1.0) (pib:15)
[18 Dec 2009 10:50] Bugs System
Pushed into 5.1.41-ndb-6.2.19 (revid:jonas@mysql.com-20091218100224-vtzr0fahhsuhjsmt) (version source revid:jonas@mysql.com-20091217101452-qwzyaig50w74xmye) (merge vers: 5.1.41-ndb-6.2.19) (pib:15)
[18 Dec 2009 11:05] Bugs System
Pushed into 5.1.41-ndb-6.3.31 (revid:jonas@mysql.com-20091218100616-75d9tek96o6ob6k0) (version source revid:jonas@mysql.com-20091217154335-290no45qdins5bwo) (merge vers: 5.1.41-ndb-6.3.31) (pib:15)
[18 Dec 2009 11:19] Bugs System
Pushed into 5.1.41-ndb-7.0.11 (revid:jonas@mysql.com-20091218101303-ga32mrnr15jsa606) (version source revid:jonas@mysql.com-20091218064304-ezreonykd9f4kelk) (merge vers: 5.1.41-ndb-7.0.11) (pib:15)