Navigation Menu

Skip to content

Commit

Permalink
storage: fix a bug that referenced table is removed on error
Browse files Browse the repository at this point in the history
If index creation is failed and `FULLTEXT INDEX (...) COMMENT 'table
"terms"'` is specified, `terms` table is removed on error.
  • Loading branch information
kou committed Dec 30, 2014
1 parent d18cd68 commit 7597bb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ha_mroonga.cpp
Expand Up @@ -3624,7 +3624,8 @@ int ha_mroonga::storage_create_indexes(TABLE *table, const char *grn_table_name,
}
if (error) {
while (true) {
if (index_tables[i]) {
if (index_tables[i] &&
!(tmp_share->index_table && tmp_share->index_table[i])) {
grn_obj_remove(ctx, index_tables[i]);
}
if (!i)
Expand Down

0 comments on commit 7597bb6

Please sign in to comment.