diff options
author | Jimmy Yang <jimmy.yang@oracle.com> | 2011-02-14 02:17:51 -0800 |
---|---|---|
committer | Jimmy Yang <jimmy.yang@oracle.com> | 2011-02-14 02:17:51 -0800 |
commit | 57325925db25e354d8e7d23c34e407605b58f3ac (patch) | |
tree | 2a200d46b778097ddf1e18c6638c03542f109e6f /storage | |
parent | f887a28cb2634652ba17fad5eb48f4809d5b5eab (diff) | |
parent | 4a8c83574626f4107ca84964f4c1faa13176eff1 (diff) | |
download | mariadb-git-57325925db25e354d8e7d23c34e407605b58f3ac.tar.gz |
Merge from mysql-5.1-innodb to mysql-5.5-innodb
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/handler/handler0alter.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index c0bd3121c9c..e0279c13de2 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -786,10 +786,6 @@ err_exit: 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 @@ 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, innodb_table->flags, user_thd); |