Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
-
None
Description
CREATE OR REPLACE TABLE t1 (a VARBINARY(32) DEFAULT CAST(0x00112233445566778899AABBCCDDEEFF AS BINARY)); |
SHOW CREATE TABLE t1; |
+-------+------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+------------------------------------------------------------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`a` varbinary(32) DEFAULT (cast(0x8899aabbccddeeff as char charset binary))
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+------------------------------------------------------------------------------------------------------------------------------------------+
|
Notice, the hex hybrid constant in the DEFAULT clause was cut from 16 bytes to 8 bytes.
If I use a hex string constat (instead of hex hybrid constant), it works as expected:
CREATE OR REPLACE TABLE t1 (a VARBINARY(32) DEFAULT CAST(X'00112233445566778899AABBCCDDEEFF' AS BINARY)); |
SHOW CREATE TABLE t1; |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`a` varbinary(32) DEFAULT (cast(X'00112233445566778899aabbccddeeff' as char charset binary))
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
|