mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -1222,4 +1222,16 @@ ALTER TABLE t1 CHANGE d c varchar(10);
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
DROP TABLE t1;
|
||||
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;
|
||||
a b
|
||||
1 a
|
||||
2 c
|
||||
3 b
|
||||
4 b
|
||||
5 a
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
Reference in New Issue
Block a user