Bug #35482 mysql-test-run have_innodb does not detect external server has Innodb support
Submitted: 21 Mar 2008 13:38 Modified: 30 Jan 2009 16:57
Reporter: Philip Stoev Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:6.0 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any
Triage: Triaged: D3 (Medium)

[21 Mar 2008 13:38] Philip Stoev
Description:
In the mysqltest language, tests can be made to require Innodb by adding the --source include/have_innodb.inc line.

However this is not a simple include file - some special handling is used in mysql-test/lib/mtr_cases.pl, and this special handling does not work properly when an external mysql server is used.

How to repeat:
$ perl mysql-test-run.pl --start-and-exit --skip-ndb --mysqld=--innodb
$ perl mysql-test-run.pl --extern --socket=var/tmp/master.sock --user=root innodb_mrr
main.innodb_mrr                [ skipped ]   No innodb support

Suggested fix:
In mysql-test/lib/mtr_cases.pl, tests containing have_innodb are skipped if  $::mysqld_variables{'innodb'} ne "TRUE", which does not appear to be a sufficiently general test to cover external servers as well.
[23 Mar 2008 18:28] Philip Stoev
What happens here is that the %mysqld_variables hash is initialized either by collect_mysqld_features() or collect_mysqld_features_from_running_server(). However, collect_mysqld_features_from_running_server() is never called, leaving the %mysqld_variables hash empty.
[25 Mar 2008 11:52] Magnus Blåudd
Running mysql-test-run.pl from a build with a mysqld having all the features you want to test should work as a workaround.
[25 Mar 2008 11:54] Philip Stoev
That is what I am doing. I have a mysqld and mysql-test-run.pl compiled with compile-pentium-debug-max-no-ndb, however it still skips innodb tests when run with --extern.
[5 Sep 2008 16:27] Magnus Blåudd
The early "skip" in mtr_cases.pl is a way to reduce the time needed for running all tests. That way we avoid starting up the server(s) and run mysqltest just to find out that the test should be skipped.

I consider that much more important than making the obscure feature --extern work.
[5 Sep 2008 16: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/53378

2677 Magnus Svensson	2008-09-05
      Bug#35482  mysql-test-run have_innodb does not detect external server has Innodb support
[6 Sep 2008 6:51] 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/53412

2677 Magnus Svensson	2008-09-05
      Bug#35482  mysql-test-run have_innodb does not detect external server has Innodb support
[7 Sep 2008 1: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/53438

2688 He Zhenxing	2008-09-07 [merge]
      Auto merge
[30 Jan 2009 13:31] Bugs System
Pushed into 6.0.10-alpha (revid:luis.soares@sun.com-20090129165607-wiskabxm948yx463) (version source revid:luis.soares@sun.com-20090129163120-e2ntks4wgpqde6zt) (merge vers: 6.0.10-alpha) (pib:6)
[30 Jan 2009 15:10] Bugs System
Pushed into 5.1.32 (revid:luis.soares@sun.com-20090129165946-d6jnnfqfokuzr09y) (version source revid:hezx@mysql.com-20080929053642-b2mfvfhzisrzj274) (merge vers: 5.1.30) (pib:6)
[30 Jan 2009 16:57] Paul Dubois
Test suite changes. No changelog entry needed.
[17 Feb 2009 14:59] Bugs System
Pushed into 5.1.32-ndb-6.3.23 (revid:tomas.ulin@sun.com-20090217131017-6u8qz1edkjfiobef) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 16:47] Bugs System
Pushed into 5.1.32-ndb-6.4.3 (revid:tomas.ulin@sun.com-20090217134419-5ha6xg4dpedrbmau) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 18:23] Bugs System
Pushed into 5.1.32-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090217134216-5699eq74ws4oxa0j) (version source revid:tomas.ulin@sun.com-20090201210519-vehobc4sy3g9s38e) (merge vers: 5.1.32-ndb-6.2.17) (pib:6)