Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL)
-
None
Description
This script queries I_S for a latin1 compressed varchar column:
CREATE OR REPLACE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1 COMPRESSED); |
SELECT
|
CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH
|
FROM
|
INFORMATION_SCHEMA.COLUMNS
|
WHERE
|
TABLE_SCHEMA='test' AND TABLE_NAME='t1' AND COLUMN_NAME='a'; |
+--------------------------+------------------------+
|
| CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH |
|
+--------------------------+------------------------+
|
| 11 | 11 |
|
+--------------------------+------------------------+
|
11 looks wrong. The expected value would be 10 for both columns.
Now trying an utf8 column:
CREATE OR REPLACE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8 COMPRESSED); |
SELECT
|
CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH
|
FROM
|
INFORMATION_SCHEMA.COLUMNS
|
WHERE
|
TABLE_SCHEMA='test' AND TABLE_NAME='t1' AND COLUMN_NAME='a'; |
+--------------------------+------------------------+
|
| CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH |
|
+--------------------------+------------------------+
|
| 10 | 31 |
|
+--------------------------+------------------------+
|
The value for CHARACTER_OCTET_LENGTH is wrong. The expected result is 30.
Attachments
Issue Links
- relates to
-
MDEV-15592 Column COMPRESSED should select a 'high order' datatype
- Closed