3655 Jon Olav Hauglid 2011-06-17
Bug#12657095 YASSL ERROR MESSAGE CONTAINS TYPO
This patch fixes a typo in a YaSSL error message.
modified:
extra/yassl/src/yassl_error.cpp
3654 Dmitry Lenev 2011-06-17
Fix for bug #12652385 - "61493: REORDERING COLUMNS
TO POSITION FIRST CAN CAUSE DATA TO BE CORRUPTED".
ALTER TABLE MODIFY/CHANGE ... FIRST did nothing except renaming
columns if new version of the table had exactly the same
structure as the old one (i.e. as result of such statement, names
of columns changed their order as specified but data in columns
didn't). The same thing happened for ALTER TABLE DROP COLUMN/ADD
COLUMN statements which were supposed to produce new version of
table with exactly the same structure as the old version of table.
I.e. in the latter case the result was the same as if old column
was renamed instead of being dropped and new column with default
as value being created.
Both these problems were caused by the fact that ALTER TABLE
implementation incorrectly interpreted both these situations as
simple renaming of columns and assumed that in-place ALTER TABLE
algorithm could have been used for them.
This patch fixes this problem by ensuring that in cases when some
column is moved to the first position or some column is dropped
the default ALTER TABLE algorithm involving table copying is
always used. This is achieved by detecting such situations in
mysql_prepare_alter_table() and setting Alter_info::change_level
to ALTER_TABLE_DATA_CHANGED for them.
@ mysql-test/r/alter_table.result
Added test for bug #12652385 - "61493: REORDERING COLUMNS TO
POSITION FIRST CAN CAUSE DATA TO BE CORRUPTED".
@ mysql-test/t/alter_table.test
Added test for bug #12652385 - "61493: REORDERING COLUMNS TO
POSITION FIRST CAN CAUSE DATA TO BE CORRUPTED".
@ sql/sql_table.cc
Changed mysql_prepare_alter_table() to detect situations in
which we some column moved to the first position or some column
is dropped and ensure that such ALTER TABLE statements won't
be carried out using in-place algorithm. The latter could have
happened before this patch if new version of table had the same
structure as the old one (except the column names).
modified:
mysql-test/r/alter_table.result
mysql-test/t/alter_table.test
sql/sql_table.cc
=== modified file 'extra/yassl/src/yassl_error.cpp'
--- a/extra/yassl/src/yassl_error.cpp 2010-02-22 13:23:47 +0000
+++ b/extra/yassl/src/yassl_error.cpp 2011-06-17 07:51:34 +0000
@@ -128,7 +128,7 @@ void SetErrorString(unsigned long error,
break;
case badVersion_error :
- strncpy(buffer, "protocl version mismatch", max);
+ strncpy(buffer, "protocol version mismatch", max);
break;
case compress_error :
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1 branch (jon.hauglid:3654 to 3655) Bug#12657095 | Jon Olav Hauglid | 19 Jun |