[MCOL-1131] Alter table fails to change the column data type Created: 2017-12-27 Updated: 2017-12-31 Resolved: 2017-12-31 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MariaDB Server |
| Affects Version/s: | 1.0.11 |
| Fix Version/s: | Icebox |
| Type: | Bug | Priority: | Major |
| Reporter: | Abhinav santi | Assignee: | Andrew Hutchings (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Environment: |
MCS AMI, 2 PMs and 1 UM |
||
| Issue Links: |
|
||||||||
| Description |
|
Alter table fails to change the data type throws syntax error ALTER TABLE `test`.`fact_test` CHANGE COLUMN `test12` `test12` VARCHAR(50); You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '`test` VARCHAR(50) |
| Comments |
| Comment by Sasha V [ 2017-12-28 ] |
|
According to the Knowledge Base: "You cannot currently use CHANGE COLUMN to change the definition of that column." |
| Comment by Abhinav santi [ 2017-12-28 ] |
|
So is there any other way to change the column definition in columnstore? |
| Comment by Sasha V [ 2017-12-28 ] |
|
I used DROP/CREATE to change the column data type. The column will be at the end of the table ( |
| Comment by Andrew Hutchings (Inactive) [ 2017-12-31 ] |
|
Closed as duplicate of |
| Comment by Andrew Hutchings (Inactive) [ 2017-12-31 ] |
|
As for Sasha's comment you can do: 1. add column (with temporary name) |