Commit d06bb27f authored by Jimmy Yang's avatar Jimmy Yang

Fix Bug #59749 Enabling concurrent reads while creating non-primary unique

index gives failures.

Approved by Marko
parent 07116bbf
2011-02-14 The InnoDB Team
* handler/handler0alter.cc:
Bug#59749 Enabling concurrent reads while creating non-primary
unique index gives failures
2011-01-31 The InnoDB Team 2011-01-31 The InnoDB Team
* btr/btr0cur.c, include/row0upd.h, * btr/btr0cur.c, include/row0upd.h,
......
...@@ -782,10 +782,6 @@ ha_innobase::add_index( ...@@ -782,10 +782,6 @@ ha_innobase::add_index(
ut_ad(error == DB_SUCCESS); ut_ad(error == DB_SUCCESS);
/* We will need to rebuild index translation table. Set
valid index entry count in the translation table to zero */
share->idx_trans_tbl.index_count = 0;
/* Commit the data dictionary transaction in order to release /* Commit the data dictionary transaction in order to release
the table locks on the system tables. This means that if the table locks on the system tables. This means that if
MySQL crashes while creating a new primary key inside MySQL crashes while creating a new primary key inside
...@@ -911,6 +907,14 @@ ha_innobase::add_index( ...@@ -911,6 +907,14 @@ ha_innobase::add_index(
} }
convert_error: convert_error:
if (error == DB_SUCCESS) {
/* Build index is successful. We will need to
rebuild index translation table. Reset the
index entry count in the translation table
to zero, so that translation table will be rebuilt */
share->idx_trans_tbl.index_count = 0;
}
error = convert_error_code_to_mysql(error, error = convert_error_code_to_mysql(error,
innodb_table->flags, innodb_table->flags,
user_thd); user_thd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment