1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for bug#23113: Different behavior on altering ENUM fields between 5.0 and 5.1

Problem: mysqld doesn't detect that enum data must be reinserted performing
'ALTER TABLE' in some cases.

Fix: reinsert data altering an enum field if enum values are changed.
This commit is contained in:
Ramil Kalimullin
2008-10-24 13:00:03 +05:00
parent a4890f896c
commit adf630dcee
4 changed files with 53 additions and 12 deletions

View File

@ -947,4 +947,16 @@ ALTER TABLE t1 CHANGE d c varchar(10);
--disable_info
DROP TABLE t1;
#
# Bug #23113: Different behavior on altering ENUM fields between 5.0 and 5.1
#
CREATE TABLE t1(a INT AUTO_INCREMENT PRIMARY KEY,
b ENUM('a', 'b', 'c') NOT NULL);
INSERT INTO t1 (b) VALUES ('a'), ('c'), ('b'), ('b'), ('a');
ALTER TABLE t1 MODIFY b ENUM('a', 'z', 'b', 'c') NOT NULL;
SELECT * FROM t1;
DROP TABLE t1;
--echo End of 5.1 tests