Bug #14207 strange change of values CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
Submitted: 21 Oct 2005 11:53 Modified: 27 Oct 2005 2:43
Reporter: Carsten Segieth Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.16-bk OS:Linux (Linux)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[21 Oct 2005 11:53] Carsten Segieth
Description:
It looks, that the fixes for bug #14064 "information_schema test fails on opnsrv6c" leads to new differences in the test cases <engine>_datadict in funcs_1 suite:

For all CHAR and VARCHAR columns in INFORMATION_SCHEMA.* and MYSQl.* (which are all utf8) the values now changed their position
(e.g. shown here for information_schema.CHARACTER_SETS.CHARACTER_SET_NAME). Prior the fix (and in 5.0.15 GA) it was
CHARACTER_MAXIMUM_LENGTH = 64
CHARACTER_OCTET_LENGTH     = 192

and now it is ...

CHARACTER_MAXIMUM_LENGTH = 192
CHARACTER_OCTET_LENGTH     = 64

From my understanding CHARACTER_OCTET_LENGTH is always greater or equal to CHARACTER_MAXIMUM_LENGTH.

The description in the reference manual (http://dev.mysql.com/doc/refman/5.0/en/columns-table.html) isn't clear enough at this point: "CHARACTER_OCTET_LENGTH should be the same as CHARACTER_MAXIMUM_LENGTH, except for multi-byte character sets.".

How to repeat:
pull mysql-test-extra-5.0, link into /mysql-test/suites and run

./mysql-test-run.pl --suite=funcs_1 innodb__datadict

Suggested fix:
change back to prevoius behaviour
[24 Oct 2005 9:21] Sergei Golubchik
Citing the standard:

3) The values of DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH,
CHARACTER_SET_CATALOG, CHARACTER_SET_SCHEMA, CHARACTER_SET_NAME,
COLLATION_CATALOG, COLLATION_SCHEMA, COLLATION_NAME, NUMERIC_PRECISION,
NUMERIC_PRECISION_RADIX, NUMERIC_SCALE, DATETIME_PRECISION,
USER_DEFINED_TYPE_CATALOG, USER_DEFINED_TYPE_SCHEMA, USER_DEFINED_TYPE_NAME,
SCOPE_CATALOG, SCOPE_SCHEMA, and SCOPE_NAME are, respectively, the data type,
the maximum length in characters if it is a character string type, the maximum
length in octets if it is a character string type <...>
[24 Oct 2005 11:47] 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/internals/31376
[25 Oct 2005 11:53] Ramil Kalimullin
fixed in 5.0.16
[27 Oct 2005 2:43] Paul DuBois
Noted in 5.0.16 changelog.