211
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
210
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
209
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
208
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
207
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
206
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
205
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
204
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
203
|
|
|
Alexey Kopytov |
12 years ago
|
|
|
202
|
|
|
Alexey Kopytov |
12 years ago
|
|
|
201
|
|
|
Alexey Kopytov |
12 years ago
|
|
|
200
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
199
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
198
|
|
|
Alexey Kopytov |
12 years ago
|
|
|
197
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
196
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
195
|
|
Bug #848703: innodb_fast_alter_column doesn't work with indexed columns
The problem was that when extending a column involved in an index, mysql_alter_table() marked the corresponding index to be recreated later (by adding it to both index_drop_buffer and index_add_buffer). Such ALTER TABLE would normally be executed by copying the table, because InnoDB would report incompatible metadata in such a case.
However, due to innodb_fast_alter_column turned on, the metadata was rightfully considered compatible, so the ALTER TABLE was executed in-place, by first adding the indexes from index_add_buffer and then dropping the ones from index_drop_buffer. Since in this case both drop and add list contained the same index, InnoDB reported a duplicate index name when trying to add the index. Reverting the order (i.e. dropping before adding) would cause problems with foreign key constraints.
Fixed by changing compare_tables() so that, if innodb_fast_alter_column is on, extending an index column does not lead to index being marked as changed.
In addition, InnoDB no longer reports extending columns as compatible metadata when innodb_fast_alter_column is OFF. This was the reasons why the bug occurred even with disabled feature.
|
Alexey Kopytov |
12 years ago
|
|
|
194
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
193
|
|
|
Oleg Tsarev |
12 years ago
|
|
|
192
|
|
|
Oleg Tsarev |
12 years ago
|
|
|