Details
-
Bug
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
-
None
Description
In the test case below, CREATE TABLE succeeds, but the following ALTER fails with ER_INVALID_DEFAULT.
I could only reproduce the error with "special" character sets (utf16, utf32, ucs2), although maybe if the test case is changed in a right way, it will show up elsewhere.
create table t (a VARBINARY(33000) DEFAULT REPEAT('a',33000)) CHARACTER SET ucs2; |
alter table t force; |
show create table t; |
|
# Cleanup
|
drop table t; |
10.3 92be8d20 |
CURRENT_TEST: bug.t2
|
mysqltest: At line 2: query 'alter table t force' failed: 1067: Invalid default value for 'a' |
However, this (same default value but from a variable instead of a function) works all right, no errors:
SET @a= REPEAT('a',33000); |
|
create table t (a VARBINARY(33000) DEFAULT @a) CHARACTER SET ucs2; |
alter table t force; |
show create table t; |
drop table t; |