Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
23.02.8
-
2024-2
Description
Currently Columnstore allows altering the column name and COMMENT on INT, but not char, varchar
Reproduction:
CREATE TABLE `t1` (
|
`id` int(11) DEFAULT NULL, |
`name1` char(10) DEFAULT NULL COMMENT 'test name', |
`name2` varchar(100) DEFAULT NULL COMMENT 'test name' |
) ENGINE=Columnstore DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
|
# Works
|
ALTER TABLE t1 CHANGE COLUMN id id1 INT;
|
ALTER TABLE t1 CHANGE COLUMN id1 id INT COMMENT 'new comment'; |
|
# Fails
|
ALTER TABLE t1 CHANGE COLUMN name1 firstname char(10); |
ALTER TABLE t1 CHANGE COLUMN firstname firstname char(10) COMMENT 'new comment'; |
|
# Fails
|
ALTER TABLE t1 CHANGE COLUMN name2 lastname char(10); |
ALTER TABLE t1 CHANGE COLUMN lastname lastname char(10) COMMENT 'new comment'; |
Error:
ERROR 1815 (HY000): Internal error: CAL0001: Alter table Failed: Changing the datatype of a column is not supported |
Workaround:
Create a new table with the desired column names and comments and migrate the data
Attachments
Issue Links
- relates to
-
MCOL-4484 "Alter table modify column oldname newname datatype" fails with Error 1815: "Changing the datatype of a column is not supported"
- Closed