-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drop primary key sometimes fails #14
Comments
|
|
mysql_prepare_create_table gets called twice. the first call is from mysql_inplace_alter_table. the second call is from mysql_alter_table->mysql_compare_tables. unfortunately, mysql_prepare_create_table messes up the column->length (sql_table.cc:3477), so we get this strange error. |
mysql_prepare_create_table is not idempotent; it modifies the alter_info struct. the alter_info struct describes the alter table operation. unfortunately, mysql_prepare_create_table is called on the inlace alter table path, and then again on the slow alter table path if the inplace alter table path can not handle the alter table operation. if it is called twice, erroneous results occur, like the bogus error when dropping the primary key as described in this issue. to fix the problem, a deep copy of the alter_info struct should be used on the inplace alter table code path. |
The text was updated successfully, but these errors were encountered: