diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2008-10-24 13:00:03 +0500 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2008-10-24 13:00:03 +0500 |
commit | 256f41edfe87bf92807d9c9500ae627a0045ef5e (patch) | |
tree | ebe76f83e6b0ae5c7d6e772bb43fd4bdee6218ed /mysql-test/r/alter_table.result | |
parent | 8e6277fb1c3c6ac156305c987e0f2c17a54c16e7 (diff) | |
download | mariadb-git-256f41edfe87bf92807d9c9500ae627a0045ef5e.tar.gz |
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.
mysql-test/r/alter_table.result:
Fix for bug#23113: Different behavior on altering ENUM fields between 5.0 and 5.1
- test result.
mysql-test/t/alter_table.test:
Fix for bug#23113: Different behavior on altering ENUM fields between 5.0 and 5.1
- test case.
sql/field.cc:
Fix for bug#23113: Different behavior on altering ENUM fields between 5.0 and 5.1
- Field_enum::is_equal() introduced, which is called to detect that a field
is changing by 'ALTER TABLE'.
sql/field.h:
Fix for bug#23113: Different behavior on altering ENUM fields between 5.0 and 5.1
- Field_enum::is_equal() introduced, which is called to detect that a field
is changing by 'ALTER TABLE'.
Diffstat (limited to 'mysql-test/r/alter_table.result')
-rw-r--r-- | mysql-test/r/alter_table.result | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index d6986f4a956..c6be8f243fc 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -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 |