Kentoku
null+****@clear*****
Thu Oct 4 10:37:57 JST 2012
Kentoku 2012-02-23 02:25:39 +0900 (Thu, 23 Feb 2012) New Revision: 442227c4307af897f16eaedae620e24b901ec4b1 https://github.com/mroonga/mroonga/commit/442227c4307af897f16eaedae620e24b901ec4b1 Log: clean up for alter table error. refs #1195 Modified files: ha_mroonga.cc Modified: ha_mroonga.cc (+6 -8) =================================================================== --- ha_mroonga.cc 2012-02-23 00:27:32 +0900 (24fd3ed) +++ ha_mroonga.cc 2012-02-23 02:25:39 +0900 (9551d95) @@ -9795,12 +9795,6 @@ int ha_mroonga::rename_table(const char *from, const char *to) DBUG_RETURN(error); } - if (to_table_name[0] == '#') - { - if ((error = alter_share_add(to, tmp_table_share))) - DBUG_RETURN(error); - } - if (tmp_share->wrapper_mode) { error = wrapper_rename_table(from, to, tmp_share, @@ -9811,8 +9805,12 @@ int ha_mroonga::rename_table(const char *from, const char *to) } mrn_free_share(tmp_share); - if (to_table_name[0] != '#') - { + if (!error && to_table_name[0] == '#') { + if ((error = alter_share_add(to, tmp_table_share))) + DBUG_RETURN(error); + } else if (error && from_table_name[0] == '#') { + alter_share_add(from, tmp_table_share); + } else { mrn_open_mutex_lock(); mrn_free_tmp_table_share(tmp_table_share); mrn_open_mutex_unlock(); -------------- next part -------------- HTML����������������������������...ダウンロード