Kouhei Sutou
null+****@clear*****
Wed Nov 2 12:34:52 JST 2016
Kouhei Sutou 2016-11-02 12:34:52 +0900 (Wed, 02 Nov 2016) New Revision: 166ee232084a1541fca426ac93e65504077af7f7 https://github.com/groonga/groonga/commit/166ee232084a1541fca426ac93e65504077af7f7 Message: Temporary table is always removable Modified files: lib/db.c Modified: lib/db.c (+6 -2) =================================================================== --- lib/db.c 2016-11-01 19:18:47 +0900 (9c9167f) +++ lib/db.c 2016-11-02 12:34:52 +0900 (abe333c) @@ -9302,20 +9302,24 @@ static grn_bool is_removable_table(grn_ctx *ctx, grn_obj *table, grn_obj *db) { grn_bool removable = GRN_TRUE; + grn_id table_id; grn_bool is_close_opened_object_mode = GRN_FALSE; grn_obj not_opened_ids; - grn_id table_id; char table_name[GRN_TABLE_MAX_KEY_SIZE]; int table_name_size; grn_table_cursor *cursor; + table_id = DB_OBJ(table)->id; + if (table_id & GRN_OBJ_TMP_OBJECT) { + return GRN_TRUE; + } + if (grn_thread_get_limit() == 1) { is_close_opened_object_mode = GRN_TRUE; } GRN_TEXT_INIT(¬_opened_ids, 0); - table_id = DB_OBJ(table)->id; table_name_size = grn_obj_name(ctx, table, table_name, GRN_TABLE_MAX_KEY_SIZE); if ((cursor = grn_table_cursor_open(ctx, db, NULL, 0, NULL, 0, 0, -1, GRN_CURSOR_BY_ID))) { -------------- next part -------------- HTML����������������������������... ダウンロード