Bug #30440 "datadict" tests (all engines) fail: Character sets depend on configuration
Submitted: 15 Aug 2007 15:29 Modified: 28 Mar 2008 19:17
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Server Severity:S3 (Non-critical)
Version:5.1.21, 5.0.50, 6.0.4 OS:Any
Assigned to: Matthias Leich CPU Architecture:Any

[15 Aug 2007 15:29] Joerg Bruehe
Description:
Detected in the 5.1.21 release builds.

The "*__datadict" tests have ".result" files which assume a specific list of character sets to be provided by the server.
However, that list depends on the configuration, so other configurations will fail the tests.

This is just a partial diff from a "community" configuration,
I have edited it to provide better column alignment:

***************
*** 9776,9789
  COLLATION_NAME        CHARACTER_SET_NAME      ID      IS_DEFAULT      IS_COMPILED     SORTLEN
  big5_chinese_ci       big5    1       Yes     Yes     1
  big5_bin              big5    84              Yes     1
! dec8_swedish_ci       dec8    3       Yes             0
! dec8_bin              dec8    69                      0
! cp850_general_ci      cp850   4       Yes             0
! cp850_bin             cp850   80                      0
! hp8_english_ci        hp8     6       Yes             0
! hp8_bin               hp8     72                      0
! koi8r_general_ci      koi8r   7       Yes             0
! koi8r_bin             koi8r   74                      0
  latin1_german1_ci     latin1  5               Yes     1
  latin1_swedish_ci     latin1  8       Yes     Yes     1
  latin1_danish_ci      latin1  15              Yes     1
--- 9776,9789
  COLLATION_NAME        CHARACTER_SET_NAME      ID      IS_DEFAULT      IS_COMPILED     SORTLEN
  big5_chinese_ci       big5    1       Yes     Yes     1
  big5_bin              big5    84              Yes     1
! dec8_swedish_ci       dec8    3       Yes     Yes     1
! dec8_bin              dec8    69              Yes     1
! cp850_general_ci      cp850   4       Yes     Yes     1
! cp850_bin             cp850   80              Yes     1
! hp8_english_ci        hp8     6       Yes     Yes     1
! hp8_bin               hp8     72              Yes     1
! koi8r_general_ci      koi8r   7       Yes     Yes     1
! koi8r_bin             koi8r   74              Yes     1
  latin1_german1_ci     latin1  5               Yes     1
  latin1_swedish_ci     latin1  8       Yes     Yes     1
  latin1_danish_ci      latin1  15              Yes     1
***************
*** 9797,9822
  latin2_hungarian_ci   latin2  21              Yes     1
  latin2_croatian_ci    latin2  27              Yes     1
  latin2_bin            latin2  77              Yes     1
! swe7_swedish_ci       swe7    10      Yes             0
! swe7_bin              swe7    82                      0
! ascii_general_ci      ascii   11      Yes             0
! ascii_bin             ascii   65                      0
  ujis_japanese_ci      ujis    12      Yes     Yes     1
  ujis_bin              ujis    91              Yes     1
  sjis_japanese_ci      sjis    13      Yes     Yes     1
  sjis_bin              sjis    88              Yes     1
! hebrew_general_ci     hebrew  16      Yes             0
! hebrew_bin            hebrew  71                      0
  tis620_thai_ci        tis620  18      Yes     Yes     4
  tis620_bin            tis620  89              Yes     1
  euckr_korean_ci       euckr   19      Yes     Yes     1
  euckr_bin             euckr   85              Yes     1
! koi8u_general_ci      koi8u   22      Yes             0
! koi8u_bin             koi8u   75                      0
  gb2312_chinese_ci     gb2312  24      Yes     Yes     1
  gb2312_bin            gb2312  86              Yes     1
! greek_general_ci      greek   25      Yes             0
! greek_bin             greek   70                      0
  cp1250_general_ci     cp1250  26      Yes     Yes     1
  cp1250_czech_cs       cp1250  34              Yes     2
  cp1250_croatian_ci    cp1250  44              Yes     1
--- 9797,9822
  latin2_hungarian_ci   latin2  21              Yes     1
  latin2_croatian_ci    latin2  27              Yes     1
  latin2_bin            latin2  77              Yes     1
! swe7_swedish_ci       swe7    10      Yes     Yes     1
! swe7_bin              swe7    82              Yes     1
! ascii_general_ci      ascii   11      Yes     Yes     1
! ascii_bin             ascii   65              Yes     1
  ujis_japanese_ci      ujis    12      Yes     Yes     1
  ujis_bin              ujis    91              Yes     1
  sjis_japanese_ci      sjis    13      Yes     Yes     1
  sjis_bin              sjis    88              Yes     1
! hebrew_general_ci     hebrew  16      Yes     Yes     1
! hebrew_bin            hebrew  71              Yes     1
  tis620_thai_ci        tis620  18      Yes     Yes     4
  tis620_bin            tis620  89              Yes     1
  euckr_korean_ci       euckr   19      Yes     Yes     1
  euckr_bin             euckr   85              Yes     1
! koi8u_general_ci      koi8u   22      Yes     Yes     1
! koi8u_bin             koi8u   75              Yes     1
  gb2312_chinese_ci     gb2312  24      Yes     Yes     1
  gb2312_bin            gb2312  86              Yes     1
! greek_general_ci      greek   25      Yes     Yes     1
! greek_bin             greek   70              Yes     1
  cp1250_general_ci     cp1250  26      Yes     Yes     1
  cp1250_czech_cs       cp1250  34              Yes     2
  cp1250_croatian_ci    cp1250  44              Yes     1
***************

How to repeat:
Run any "*__datadict" test across all different configurations.

Suggested fix:
Split the "*__datadict" tests into smaller parts,
so that not each test (by table handler) tries to check the character sets
(unless there are reasons for this I am not aware of).

Try to check only for a minimum listof charsets, guaranteed to exist in all configurations.

Have a separate test checking for all, and put a suitable "require" line into it.
[27 Aug 2007 18:05] 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:22] 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:59] 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:39] Paul DuBois
Test case changes. No changelog entry needed.
[22 Nov 2007 21:27] Joerg Bruehe
This bug is *not* fixed.

Check the two changesets mentioned on August 27 + 30:
Neither does any handling of collation "dec8_swedish_ci" which is the first difference listed.
In a build using the community sources of 5.0.51 (which are based on 5.0.50), I still have differences like the one whose start I quote below.

It does not affect all platforms, I will see to find out what causes this.

innodb__datadict               [ fail ]

--- /PATH/mysql-test/suite/funcs_1/r/innodb__datadict.result
+++ /PATH/mysql-test/var/log/innodb__datadict.reject
@@ -4302,9 +4377,9 @@
 COLLATION_NAME CHARACTER_SET_NAME      ID      IS_DEFAULT      IS_COMPILED     SORTLEN
 big5_chinese_ci        big5    1       Yes     Yes     1
 big5_bin       big5    84              Yes     1
-dec8_swedish_ci        dec8    3       Yes             0
-dec8_bin       dec8    69                      0
-cp850_general_ci       cp850   4       Yes             0
+dec8_swedish_ci        dec8    3       Yes     Yes     1
+dec8_bin       dec8    69              Yes     1
+cp850_general_ci       cp850   4       Yes     Yes     1
 select * from information_schema.collation_character_set_applicability limit 0, 5;
 COLLATION_NAME CHARACTER_SET_NAME
 big5_chinese_ci        big5
@@ -4447,8 +4522,8 @@
 COLLATION_NAME CHARACTER_SET_NAME      ID      IS_DEFAULT      IS_COMPILED     SORTLEN
 big5_chinese_ci        big5    1       Yes     Yes     1
 latin2_czech_cs        latin2  2               Yes     4
-dec8_swedish_ci        dec8    3       Yes             0
-cp850_general_ci       cp850   4       Yes             0
+dec8_swedish_ci        dec8    3       Yes     Yes     1
+cp850_general_ci       cp850   4       Yes     Yes     1
 latin1_german1_ci      latin1  5               Yes     1
 select * from collation_character_set_applicability
 order by character_set_name desc, collation_name limit 0, 5;
@@ -8165,14 +8261,14 @@
 COLLATION_NAME CHARACTER_SET_NAME      ID      IS_DEFAULT      IS_COMPILED     SORTLEN
 big5_chinese_ci        big5    1       Yes     Yes     1
 big5_bin       big5    84              Yes     1
-dec8_swedish_ci        dec8    3       Yes             0
-dec8_bin       dec8    69                      0
-cp850_general_ci       cp850   4       Yes             0
-cp850_bin      cp850   80                      0
-hp8_english_ci hp8     6       Yes             0
-hp8_bin        hp8     72                      0
-koi8r_general_ci       koi8r   7       Yes             0
-koi8r_bin      koi8r   74                      0
+dec8_swedish_ci        dec8    3       Yes     Yes     1
+dec8_bin       dec8    69              Yes     1
+cp850_general_ci       cp850   4       Yes     Yes     1
+cp850_bin      cp850   80              Yes     1
+hp8_english_ci hp8     6       Yes     Yes     1
+hp8_bin        hp8     72              Yes     1
+koi8r_general_ci       koi8r   7       Yes     Yes     1
+koi8r_bin      koi8r   74              Yes     1
 latin1_german1_ci      latin1  5               Yes     1
 latin1_swedish_ci      latin1  8       Yes     Yes     1
 latin1_danish_ci       latin1  15              Yes     1
@@ -8186,36 +8282,36 @@
...
@@ -8259,33 +8354,33 @@
...
[14 Jan 2008 13:57] Joerg Bruehe
Repeated in the release builds of 5.0.54a for the "cluster" configuration.
[18 Feb 2008 16:11] Matthias Leich
This bug will be fixed within
WL#4203 Reorganize and fix the data dictionary tests of
        testsuite funcs_1
[25 Feb 2008 20:52] 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/42956

ChangeSet@1.2584, 2008-02-25 21:52:13+01:00, mleich@five.local.lan +197 -0
  WL#4203 Reorganize and fix the data dictionary tests of
          testsuite funcs_1
  1. Fix the following bugs
     Bug#30440 "datadict" tests (all engines) fail: Character sets depend on configuration
        Solution: Test variants charset_collation_* adjusted to different builds
     Bug#32603 "datadict" tests (all engines) fail in "community" tree: "PROFILING" table
        Solution: Excluding "PROFILING" table from queries
     Bug#33654 "slow log" is missing a line
        Solution: Unify the content of the fields TABLES.TABLE_ROWS and
                  STATISTICS.CARDINALITY within result sets
     Bug#34532 Some funcs_1 tests do not clean up at end of testing
        Solution: DROP objects/reset global server variables modified during testing
                  + let tests missing implementation end before loading of tables
     Bug#31421 funcs_1: ndb__datadict fails, discrepancy between scripts and expected results
        Solution: Cut <engine>__datadict tests into smaller tests + generate new results.
     Bug#33599 INFORMATION_SCHEMA.STATISTICS got a new column INDEX_COMMENT: tests fail (2)
        Generation of new results during post merge fix
     Bug#33600 CHARACTER_OCTET_LENGTH is now CHARACTER_MAXIMUM_LENGTH * 4
        Generation of new results during post merge fix
     Bug#33631 Platform-specific replace of CHARACTER_MAXIMUM_LENGTH broken by 4-byte encoding
        Generation of new results during post merge fix
        + removal of platform-specific replace routine (no more needed)
  2. Restructure the tests
     - Test not more than one INFORMATION_SCHEMA view per testscript
     - Separate tests of I_S view layout+functionality from content related to the
       all time existing databases "information_schema", "mysql" and "test"
     - Avoid storage engine related variants of tests which are not sensible to
       storage engines at all.
  3. Reimplement or add some subtests + cleanup
  There is a significant probability that even the reviewed changeset 
  - does not fix all bugs from above   or
  - contains new bugs which show up on some platforms <> Linux or on one of
    the various build types
[27 Feb 2008 11: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/43040

ChangeSet@1.2584, 2008-02-27 12:04:39+01:00, mleich@five.local.lan +194 -0
  WL#4203 Reorganize and fix the data dictionary tests of
          testsuite funcs_1
  1. Fix the following bugs
     Bug#30440 "datadict" tests (all engines) fail: Character sets depend on configuration
        Solution: Test variants charset_collation_* adjusted to different builds
     Bug#32603 "datadict" tests (all engines) fail in "community" tree: "PROFILING" table
        Solution: Excluding "PROFILING" table from queries
     Bug#33654 "slow log" is missing a line
        Solution: Unify the content of the fields TABLES.TABLE_ROWS and
                  STATISTICS.CARDINALITY within result sets
     Bug#34532 Some funcs_1 tests do not clean up at end of testing
        Solution: DROP objects/reset global server variables modified during testing
                  + let tests missing implementation end before loading of tables
     Bug#31421 funcs_1: ndb__datadict fails, discrepancy between scripts and expected results
        Solution: Cut <engine>__datadict tests into smaller tests + generate new results.
     Bug#33599 INFORMATION_SCHEMA.STATISTICS got a new column INDEX_COMMENT: tests fail (2)
        Generation of new results during post merge fix
     Bug#33600 CHARACTER_OCTET_LENGTH is now CHARACTER_MAXIMUM_LENGTH * 4
        Generation of new results during post merge fix
     Bug#33631 Platform-specific replace of CHARACTER_MAXIMUM_LENGTH broken by 4-byte encoding
        Generation of new results during post merge fix
        + removal of platform-specific replace routine (no more needed)
  2. Restructure the tests
     - Test not more than one INFORMATION_SCHEMA view per testscript
     - Separate tests of I_S view layout+functionality from content related to the
       all time existing databases "information_schema", "mysql" and "test"
     - Avoid storage engine related variants of tests which are not sensible to
       storage engines at all.
  3. Reimplement or add some subtests + cleanup
  There is a significant probability that even the reviewed changeset 
  - does not fix all bugs from above   or
  - contains new bugs which show up on some platforms <> Linux or on one of
    the various build types
[4 Mar 2008 21:26] 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/43431

ChangeSet@1.2580, 2008-03-04 22:25:11+01:00, mleich@five.local.lan +195 -0
    WL#4203 Reorganize and fix the data dictionary tests of
            testsuite funcs_1
    1. Fix the following bugs
       Bug#30440 "datadict" tests (all engines) fail: Character sets depend on configuration
          Solution: Test variants charset_collation_* adjusted to different builds
       Bug#32603 "datadict" tests (all engines) fail in "community" tree: "PROFILING" table
          Solution: Excluding "PROFILING" table from queries
       Bug#33654 "slow log" is missing a line
          Solution: Unify the content of the fields TABLES.TABLE_ROWS and
                    STATISTICS.CARDINALITY within result sets
       Bug#34532 Some funcs_1 tests do not clean up at end of testing
          Solution: DROP objects/reset global server variables modified during testing
                    + let tests missing implementation end before loading of tables
       Bug#31421 funcs_1: ndb__datadict fails, discrepancy between scripts and expected results
          Solution: Cut <engine>__datadict tests into smaller tests + generate new results.
       Bug#33599 INFORMATION_SCHEMA.STATISTICS got a new column INDEX_COMMENT: tests fail (2)
          Generation of new results during post merge fix
       Bug#33600 CHARACTER_OCTET_LENGTH is now CHARACTER_MAXIMUM_LENGTH * 4
          Generation of new results during post merge fix
       Bug#33631 Platform-specific replace of CHARACTER_MAXIMUM_LENGTH broken by 4-byte encoding
          Generation of new results during post merge fix
          + removal of platform-specific replace routine (no more needed)
    2. Restructure the tests
       - Test not more than one INFORMATION_SCHEMA view per testscript
       - Separate tests of I_S view layout+functionality from content related to the
         all time existing databases "information_schema", "mysql" and "test"
       - Avoid storage engine related variants of tests which are not sensible to
         storage engines at all.
    3. Reimplement or add some subtests + cleanup
    There is a some probability that even the reviewed changeset
    - does not fix all bugs from above   or
    - contains new bugs which show up on some platforms <> Linux or on one of
      the various build types
    4. The changeset contains fixes according to
       - one code review
       - minor bugs within testing code found after code review
       - problems found during tests with 5.0.56 in build environment
[5 Mar 2008 17:22] 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/43479

ChangeSet@1.2581, 2008-03-05 18:20:34+01:00, mleich@five.local.lan +195 -0
    WL#4203 Reorganize and fix the data dictionary tests of
            testsuite funcs_1
    1. Fix the following bugs
       Bug#30440 "datadict" tests (all engines) fail: Character sets depend on configuration
          Solution: Test variants charset_collation_* adjusted to different builds
       Bug#32603 "datadict" tests (all engines) fail in "community" tree: "PROFILING" table
          Solution: Excluding "PROFILING" table from queries
       Bug#33654 "slow log" is missing a line
          Solution: Unify the content of the fields TABLES.TABLE_ROWS and
                    STATISTICS.CARDINALITY within result sets
       Bug#34532 Some funcs_1 tests do not clean up at end of testing
          Solution: DROP objects/reset global server variables modified during testing
                    + let tests missing implementation end before loading of tables
       Bug#31421 funcs_1: ndb__datadict fails, discrepancy between scripts and expected results
          Solution: Cut <engine>__datadict tests into smaller tests + generate new results.
       Bug#33599 INFORMATION_SCHEMA.STATISTICS got a new column INDEX_COMMENT: tests fail (2)
          Generation of new results during post merge fix
       Bug#33600 CHARACTER_OCTET_LENGTH is now CHARACTER_MAXIMUM_LENGTH * 4
          Generation of new results during post merge fix
       Bug#33631 Platform-specific replace of CHARACTER_MAXIMUM_LENGTH broken by 4-byte encoding
          Generation of new results during post merge fix
          + removal of platform-specific replace routine (no more needed)
    2. Restructure the tests
       - Test not more than one INFORMATION_SCHEMA view per testscript
       - Separate tests of I_S view layout+functionality from content related to the
         all time existing databases "information_schema", "mysql" and "test"
       - Avoid storage engine related variants of tests which are not sensible to
         storage engines at all.
    3. Reimplement or add some subtests + cleanup
    There is a some probability that even the reviewed changeset
    - does not fix all bugs from above   or
    - contains new bugs which show up on some platforms <> Linux or on one of
      the various build types
    4. The changeset contains fixes according to
       - one code review
       - minor bugs within testing code found after code review
       - problems found during tests with 5.0.56 in build environment
[7 Mar 2008 16:34] 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/43608

ChangeSet@1.2581, 2008-03-07 17:33:07+01:00, mleich@five.local.lan +226 -0
  WL#4203 Reorganize and fix the data dictionary tests of
          testsuite funcs_1
  1. Fix the following bugs
     Bug#30440 "datadict" tests (all engines) fail: Character sets depend on configuration
        Solution: Test variants charset_collation_* adjusted to different builds
     Bug#32603 "datadict" tests (all engines) fail in "community" tree: "PROFILING" table
        Solution: Excluding "PROFILING" table from queries
     Bug#33654 "slow log" is missing a line
        Solution: Unify the content of the fields TABLES.TABLE_ROWS and
                  STATISTICS.CARDINALITY within result sets
     Bug#34532 Some funcs_1 tests do not clean up at end of testing
        Solution: DROP objects/reset global server variables modified during testing
                  + let tests missing implementation end before loading of tables
     Bug#31421 funcs_1: ndb__datadict fails, discrepancy between scripts and expected results
        Solution: Cut <engine>__datadict tests into smaller tests + generate new results.
     Bug#33599 INFORMATION_SCHEMA.STATISTICS got a new column INDEX_COMMENT: tests fail (2)
        Generation of new results during post merge fix
     Bug#33600 CHARACTER_OCTET_LENGTH is now CHARACTER_MAXIMUM_LENGTH * 4
        Generation of new results during post merge fix
     Bug#33631 Platform-specific replace of CHARACTER_MAXIMUM_LENGTH broken by 4-byte encoding
        Generation of new results during post merge fix
        + removal of platform-specific replace routine (no more needed)
  2. Restructure the tests
     - Test not more than one INFORMATION_SCHEMA view per testscript
     - Separate tests of I_S view layout+functionality from content related to the
       all time existing databases "information_schema", "mysql" and "test"
     - Avoid storage engine related variants of tests which are not sensible to
       storage engines at all.
  3. Reimplement or add some subtests + cleanup
     There is a some probability that even the reviewed changeset
     - does not fix all bugs from above   or
     - contains new bugs which show up on some platforms <> Linux or on one of
       the various build types
  4. The changeset contains fixes according to
     - one code review
     - minor bugs within testing code found after code review (accepted by reviewer)
     - problems found during tests with 5.0.56 in build environment
[11 Mar 2008 11:19] Matthias Leich
WL#4203 Reorganize and fix the data dictionary tests of
        testsuite funcs_1
was pushed to mysql-<version>-build
Version is in (5.0,5.1,6.0).

1. The tests "<engine>__datadict" do no more exist.
2. The checks where the problem above occured were
   moved into the new tests "charset_collation_<number>".
   Three build types (-> <number>) are supported.
3. These tests run at the beginning some queries on the
   server and try to determine which type of build
   we have.
   If the build type fits to the current test
   than the checks for charsets and collations are
   executed. Otherwise the test is skipped.
[27 Mar 2008 22:03] Bugs System
Pushed into 5.1.24-rc
[27 Mar 2008 22:11] Bugs System
Pushed into 5.0.60
[28 Mar 2008 11:09] Bugs System
Pushed into 6.0.5-alpha
[28 Mar 2008 19:17] Paul DuBois
Fix involves test case changes. No changelog entry needed.