I am changing a column from text to varchar column.
+------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+--------------+------+-----+---------+-------+
| ID | bigint(19) | NO | PRI | NULL | |
| STATUS | varchar(120) | YES | | NULL | |
| PRIORITY | varchar(120) | YES | | NULL | |
| DESCRIPTION | text | YES | | NULL | |
when i execute the below query,
alter table StatInfo modify column DESCRIPTION varchar(255) NULL;
It says ERROR 1406 (22001): Data too long for column 'DESCRIPTION' at row 7
It doesn't truncates the value in the column and alters the table why?. where as in older version it works.