Bug #33631 Platform-specific replace of CHARACTER_MAXIMUM_LENGTH broken by 4-byte encoding
Submitted: 2 Jan 2008 19:08 Modified: 28 Mar 2008 19:24
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Engine Severity:S3 (Non-critical)
Version:6.0.4-alpha OS:Any
Assigned to: Matthias Leich CPU Architecture:Any

[2 Jan 2008 19:08] Joerg Bruehe
Description:
The following difference shows up in the build of 6.0.4-alpha,
on all platforms, in all <engine>__datadict tests
(innodb__datadict, memory__datadict, myisam__datadict).

I assume this is a consequence of the change that "utf8" now is an encoding using up to 4 bytes per character (previous: 3).
See bug#33600 for other test failures caused by this change.

I strongly suspect that the value "20480" in the "result" file is bogus as well, as all these values may be manipulated by the "replace" statements in
   suite/funcs_1/datadict/datadict_bug_12777.inc

@@ -8906,9 +8975,9 @@
 FILES  STATUS  varchar(20)
 FILES  EXTRA   varchar(255)
 GLOBAL_STATUS  VARIABLE_NAME   varchar(64)
-GLOBAL_STATUS  VARIABLE_VALUE  varchar(20480)
+GLOBAL_STATUS  VARIABLE_VALUE  varchar(16300)
 GLOBAL_VARIABLES       VARIABLE_NAME   varchar(64)
-GLOBAL_VARIABLES       VARIABLE_VALUE  varchar(20480)
+GLOBAL_VARIABLES       VARIABLE_VALUE  varchar(16300)
 KEY_COLUMN_USAGE       CONSTRAINT_CATALOG      varchar(4096)
 KEY_COLUMN_USAGE       CONSTRAINT_SCHEMA       varchar(64)
 KEY_COLUMN_USAGE       CONSTRAINT_NAME varchar(64)
@@ -9030,9 +9099,9 @@
 SCHEMA_PRIVILEGES      PRIVILEGE_TYPE  varchar(64)
 SCHEMA_PRIVILEGES      IS_GRANTABLE    varchar(3)
 SESSION_STATUS VARIABLE_NAME   varchar(64)
-SESSION_STATUS VARIABLE_VALUE  varchar(20480)
+SESSION_STATUS VARIABLE_VALUE  varchar(16300)
 SESSION_VARIABLES      VARIABLE_NAME   varchar(64)
-SESSION_VARIABLES      VARIABLE_VALUE  varchar(20480)
+SESSION_VARIABLES      VARIABLE_VALUE  varchar(16300)
 STATISTICS     TABLE_CATALOG   varchar(4096)
 STATISTICS     TABLE_SCHEMA    varchar(64)
 STATISTICS     TABLE_NAME      varchar(64)

How to repeat:
Run the extra tests.

Suggested fix:
Change the "replace" commands in "suite/funcs_1/datadict/datadict_bug_12777.inc" so that they do *not* generate a numeric value that differs from what the server returned.
*If* such a replacement is really necessary (bug#12777), then replace the values (checked by platform !) with some text string, like "MAXPATHLEN" or "4_MAXPATHLEN".

The current practice of silently changing values in the result file just obscures the real problems, they should be made obvious.
[11 Mar 2008 13:21] 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 test "is_columns_...".
3. Files with expected results were generated for
   MySQLÖ 5.0, 5.1 and 6.0.
[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:10] Bugs System
Pushed into 6.0.5-alpha
[28 Mar 2008 19:24] Paul DuBois
Fix involves test case changes. No changelog entry needed.