Bug #30420 "datadict" tests (all engines) fail: Release build has help tables loaded
Submitted: 14 Aug 2007 20:16 Modified: 26 Sep 2007 13:41
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.1.21, 5.0.48 OS:Any
Assigned to: Matthias Leich CPU Architecture:Any

[14 Aug 2007 20:16] Joerg Bruehe
Description:
Detected in the 5.1.21 release builds.

The "*__datadict" tests have ".result" files which assume the database is empty.

In a release build, bowever, we use an installation package,
and so the help tables are loaded.

See these differences:

-------------------------------------------------------
*** /PATH/mysql-test/suite/funcs_1/r/innodb__datadict.result
--- /PATH/mysql-test/suite/funcs_1/r/innodb__datadict.reject
***************
...
***************
*** 3241,3254
  NULL  mysql   event   0       mysql   PRIMARY 1       db      A       NULL    NULL    NULL            BTREE
  NULL  mysql   event   0       mysql   PRIMARY 2       name    A       0       NULL    NULL            BTREE
  NULL  mysql   func    0       mysql   PRIMARY 1       name    A       0       NULL    NULL            BTREE
! NULL  mysql   help_category   0       mysql   PRIMARY 1       help_category_id        A       0       NULL    NULL            BTREE
! NULL  mysql   help_category   0       mysql   name    1       name    A       0       NULL    NULL            BTREE
! NULL  mysql   help_keyword    0       mysql   PRIMARY 1       help_keyword_id A       0       NULL    NULL            BTREE
! NULL  mysql   help_keyword    0       mysql   name    1       name    A       0       NULL    NULL            BTREE
  NULL  mysql   help_relation   0       mysql   PRIMARY 1       help_keyword_id A       NULL    NULL    NULL            BTREE
! NULL  mysql   help_relation   0       mysql   PRIMARY 2       help_topic_id   A       0       NULL    NULL            BTREE
! NULL  mysql   help_topic      0       mysql   PRIMARY 1       help_topic_id   A       0       NULL    NULL            BTREE
! NULL  mysql   help_topic      0       mysql   name    1       name    A       0       NULL    NULL            BTREE
  NULL  mysql   host    0       mysql   PRIMARY 1       Host    A       NULL    NULL    NULL            BTREE
  NULL  mysql   host    0       mysql   PRIMARY 2       Db      A       0       NULL    NULL            BTREE
  NULL  mysql   ndb_binlog_index        0       mysql   PRIMARY 1       epoch   A       0       NULL    NULL            BTREE
--- 3241,3254
  NULL  mysql   event   0       mysql   PRIMARY 1       db      A       NULL    NULL    NULL            BTREE
  NULL  mysql   event   0       mysql   PRIMARY 2       name    A       0       NULL    NULL            BTREE
  NULL  mysql   func    0       mysql   PRIMARY 1       name    A       0       NULL    NULL            BTREE
! NULL  mysql   help_category   0       mysql   PRIMARY 1       help_category_id        A       37      NULL    NULL            BTREE
! NULL  mysql   help_category   0       mysql   name    1       name    A       37      NULL    NULL            BTREE
! NULL  mysql   help_keyword    0       mysql   PRIMARY 1       help_keyword_id A       424     NULL    NULL            BTREE
! NULL  mysql   help_keyword    0       mysql   name    1       name    A       424     NULL    NULL            BTREE
  NULL  mysql   help_relation   0       mysql   PRIMARY 1       help_keyword_id A       NULL    NULL    NULL            BTREE
! NULL  mysql   help_relation   0       mysql   PRIMARY 2       help_topic_id   A       901     NULL    NULL            BTREE
! NULL  mysql   help_topic      0       mysql   PRIMARY 1       help_topic_id   A       479     NULL    NULL            BTREE
! NULL  mysql   help_topic      0       mysql   name    1       name    A       479     NULL    NULL            BTREE
  NULL  mysql   host    0       mysql   PRIMARY 1       Host    A       NULL    NULL    NULL            BTREE
  NULL  mysql   host    0       mysql   PRIMARY 2       Db      A       0       NULL    NULL            BTREE
  NULL  mysql   ndb_binlog_index        0       mysql   PRIMARY 1       epoch   A       0       NULL    NULL            BTREE
***************

In other statements, this causes corresponding differences:
***************
*** 1211,1217
  ENGINE        MyISAM
  VERSION       10
  ROW_FORMAT    Fixed
! TABLE_ROWS    0
  AVG_ROW_LENGTH        #ARL#
  DATA_LENGTH   #DL#
  MAX_DATA_LENGTH       #MDL#
--- 1211,1217
  ENGINE        MyISAM
  VERSION       10
  ROW_FORMAT    Fixed
! TABLE_ROWS    37
  AVG_ROW_LENGTH        #ARL#
  DATA_LENGTH   #DL#
  MAX_DATA_LENGTH       #MDL#
***************
*** 1232,1238
  ENGINE        MyISAM
  VERSION       10
  ROW_FORMAT    Fixed
! TABLE_ROWS    0
  AVG_ROW_LENGTH        #ARL#
  DATA_LENGTH   #DL#
  MAX_DATA_LENGTH       #MDL#
--- 1232,1238
  ENGINE        MyISAM
  VERSION       10
  ROW_FORMAT    Fixed
! TABLE_ROWS    424
  AVG_ROW_LENGTH        #ARL#
  DATA_LENGTH   #DL#
  MAX_DATA_LENGTH       #MDL#
***************
*** 1253,1259
  ENGINE        MyISAM
  VERSION       10
  ROW_FORMAT    Fixed
! TABLE_ROWS    0
  AVG_ROW_LENGTH        #ARL#
  DATA_LENGTH   #DL#
  MAX_DATA_LENGTH       #MDL#
--- 1253,1259
  ENGINE        MyISAM
  VERSION       10
  ROW_FORMAT    Fixed
! TABLE_ROWS    901
  AVG_ROW_LENGTH        #ARL#
  DATA_LENGTH   #DL#
  MAX_DATA_LENGTH       #MDL#
***************
*** 1274,1280
  ENGINE        MyISAM
  VERSION       10
  ROW_FORMAT    Dynamic
! TABLE_ROWS    0
  AVG_ROW_LENGTH        #ARL#
  DATA_LENGTH   #DL#
  MAX_DATA_LENGTH       #MDL#
--- 1274,1280
  ENGINE        MyISAM
  VERSION       10
  ROW_FORMAT    Dynamic
! TABLE_ROWS    479
  AVG_ROW_LENGTH        #ARL#
  DATA_LENGTH   #DL#
  MAX_DATA_LENGTH       #MDL#
***************

There may be further differences cause by this which I have not yet analyzed.

Similar for the other "*__datadict" tests.

How to repeat:
Run the "funcs_1" suite in a DB which has been "installed",
so that the help tables are loaded.

Suggested fix:
Rather than suppress these differences (too complicated and error-prone),
these tests might always be run with help tables loaded.
[14 Aug 2007 20:38] Joerg Bruehe
This difference looks related, judging from the 901 value:

***************
*** 3481,3487
  45
  select max(cardinality) from statistics;
  max(cardinality)
! 393
  select concat("View '",
  table_name, "' is associated with the database '", table_schema, "'.")
  AS "Who is Who for the Views"
--- 3481,3487
  45
  select max(cardinality) from statistics;
  max(cardinality)
! 901
  select concat("View '",
  table_name, "' is associated with the database '", table_schema, "'.")
  AS "Who is Who for the Views"
***************
[27 Aug 2007 18:01] Matthias Leich
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/33110

ChangeSet@1.2489, 2007-08-25 21:14:52+02:00, mleich@four.local.lan +13 -0
  Fixes for
     Bug#30418 "datadict" tests (all engines) fail: Dependency on the host name
                for ordering
     Bug#30420 "datadict" tests (all engines) fail: Release build has help tables loaded
     Bug#30438 "{memory,myisam,ndb}__datadict" tests fail: Use "InnoDB" without checking
     Bug#30440 "datadict" tests (all engines) fail: Character sets depend on configuration
  Attention: Only the build team can check if Bug#30440 is really fixed.
[27 Aug 2007 18:21] Trudy Pelzer
Note that the patch (http://lists.mysql.com/commits/33110)
is for 5.0 only; it does not fix the tests for 5.1 and up
due to differences between 5.0 and 5.1+. This patch will 
be pushed to 5.0 and null-merged upward, then a new patch
will be written to fix the tests for 5.1 and up.
[30 Aug 2007 10:58] Matthias Leich
Sorry for confusing commit emails which were sent
to partially wrong email lists.
ChangeSet@1.1810.2871.68, 2007-08-28
    (http://lists.mysql.com/commits/33239)
fixes this bug for MySQL 5.0.
Fix is pushed.

ChangeSet@1.2545, 2007-08-28   
ChangeSet@1.2546, 2007-08-28
    (http://lists.mysql.com/commits/33248)
ChangeSet@1.2547, 2007-08-29
    (http://lists.mysql.com/commits/33397)
fix this bug for MySQL 5.1.
Attention:
   The test ndb__datadict fails because
   of reasons outside of the scope of this bug fix.
Fix is pushed.

There is no documentation needed.
[26 Sep 2007 13:08] Bugs System
Pushed into 5.0.50
[26 Sep 2007 13:21] Bugs System
Pushed into 5.1.23-beta
[26 Sep 2007 13:41] Paul DuBois
Test case changes. No changelog entry needed.