Kouhei Sutou
null+****@clear*****
Mon Aug 7 22:35:22 JST 2017
Kouhei Sutou 2017-08-07 22:35:22 +0900 (Mon, 07 Aug 2017) New Revision: 37c2597e07775c128faa70ec1446ab1bd6afa1a4 https://github.com/mroonga/mroonga/commit/37c2597e07775c128faa70ec1446ab1bd6afa1a4 Message: Remove needless temporary table detection Temporary table detection doesn't work in embedded mode. Modified files: ha_mroonga.cpp lib/mrn_path_mapper.cpp Modified: ha_mroonga.cpp (+1 -7) =================================================================== --- ha_mroonga.cpp 2017-08-07 15:22:56 +0900 (d81621cf) +++ ha_mroonga.cpp 2017-08-07 22:35:22 +0900 (0756e72d) @@ -5031,7 +5031,7 @@ int ha_mroonga::delete_table(const char *name) } if (!wrap_handlerton) { - bool open_table_to_get_wrap_handlerton = !mapper.is_temporary_table_name(); + bool open_table_to_get_wrap_handlerton = true; if (mapper.is_internal_table_name()) { open_table_to_get_wrap_handlerton = false; } @@ -5084,12 +5084,6 @@ int ha_mroonga::delete_table(const char *name) error = operations_->clear(name, strlen(name)); } - if (!error && - mapper.is_temporary_table_name() && - !mapper.is_internal_table_name()) { - mrn_db_manager->drop(name); - } - DBUG_RETURN(error); } Modified: lib/mrn_path_mapper.cpp (+0 -28) =================================================================== --- lib/mrn_path_mapper.cpp 2017-08-07 15:22:56 +0900 (00487baf) +++ lib/mrn_path_mapper.cpp 2017-08-07 22:35:22 +0900 (43f276f4) @@ -226,32 +226,4 @@ namespace mrn { bool PathMapper::is_internal_table_name() { return mysql_table_name()[0] == '#'; } - - bool PathMapper::is_temporary_table_name() { - if (!mysql_data_home_path_) { - return original_mysql_path_[0] != FN_CURLIB; - } - - if (original_mysql_path_[0] == FN_CURLIB) { - return false; - } - - size_t original_mysql_path_len = strlen(original_mysql_path_); - size_t mysql_data_home_path_len = strlen(mysql_data_home_path_); - if (original_mysql_path_len < mysql_data_home_path_len) { - return true; - } - - if (strncmp(original_mysql_path_, - mysql_data_home_path_, - mysql_data_home_path_len) != 0) { - return true; - } - - if (strchr(&original_mysql_path_[mysql_data_home_path_len], FN_LIBCHAR)) { - return true; - } - - return false; - } } -------------- next part -------------- HTML����������������������������...Descargar