From 256f41edfe87bf92807d9c9500ae627a0045ef5e Mon Sep 17 00:00:00 2001 From: Ramil Kalimullin Date: Fri, 24 Oct 2008 13:00:03 +0500 Subject: 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'. --- sql/field.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/field.h') diff --git a/sql/field.h b/sql/field.h index aa69fea6bdd..81905cc64ae 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1853,6 +1853,8 @@ public: CHARSET_INFO *sort_charset(void) const { return &my_charset_bin; } private: int do_save_field_metadata(uchar *first_byte); + bool compare_enum_values(TYPELIB *values); + uint is_equal(Create_field *new_field); }; -- cgit v1.2.1