Commit 8586497e authored by Jimmy Yang's avatar Jimmy Yang

Merge from mysql-5.1-innodb to mysql-5.5-innodb

parents 4c5c1c5d d06bb27f
......@@ -786,10 +786,6 @@ ha_innobase::add_index(
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
the table locks on the system tables. This means that if
MySQL crashes while creating a new primary key inside
......@@ -915,6 +911,14 @@ ha_innobase::add_index(
}
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,
innodb_table->flags,
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