Kouhei Sutou
null+****@clear*****
Sat Aug 3 18:31:44 JST 2013
Kouhei Sutou 2013-08-03 18:31:44 +0900 (Sat, 03 Aug 2013) New Revision: b1a805ba57f3f65e42173eec589ac862e460fbcc https://github.com/groonga/groonga/commit/b1a805ba57f3f65e42173eec589ac862e460fbcc Message: table_remove: disable removing patricia trie table referenced by vector column Added files: test/command/suite/table_remove/patricia_trie/referenced/column_vector.expected test/command/suite/table_remove/patricia_trie/referenced/column_vector.test Modified files: lib/db.c Modified: lib/db.c (+1 -0) =================================================================== --- lib/db.c 2013-08-03 18:30:17 +0900 (fafd1c4) +++ lib/db.c 2013-08-03 18:31:44 +0900 (33f80ca) @@ -6663,6 +6663,7 @@ is_removable_table(grn_ctx *ctx, grn_obj *table, grn_obj *db) } switch (object->header.type) { + case GRN_COLUMN_VAR_SIZE : case GRN_COLUMN_FIX_SIZE : if (object->header.domain == table_id) { break; Added: test/command/suite/table_remove/patricia_trie/referenced/column_vector.expected (+24 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/table_remove/patricia_trie/referenced/column_vector.expected 2013-08-03 18:31:44 +0900 (136a657) @@ -0,0 +1,24 @@ +table_create Names TABLE_PAT_KEY ShortText +[[0,0.0,0.0],true] +table_create Users TABLE_HASH_KEY ShortText +[[0,0.0,0.0],true] +column_create Users name COLUMN_VECTOR Names +[[0,0.0,0.0],true] +table_remove Names +[ + [ + [ + -2, + 0.0, + 0.0 + ], + "[table][remove] column that references the table exists: <Users.name> -> <Names>" + ], + false +] +#|e| [table][remove] column that references the table exists: <Users.name> -> <Names> +dump +table_create Names TABLE_PAT_KEY ShortText +table_create Users TABLE_HASH_KEY ShortText +column_create Users name COLUMN_VECTOR Names + Added: test/command/suite/table_remove/patricia_trie/referenced/column_vector.test (+7 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/table_remove/patricia_trie/referenced/column_vector.test 2013-08-03 18:31:44 +0900 (7a5889a) @@ -0,0 +1,7 @@ +table_create Names TABLE_PAT_KEY ShortText +table_create Users TABLE_HASH_KEY ShortText +column_create Users name COLUMN_VECTOR Names + +table_remove Names + +dump -------------- next part -------------- HTML����������������������������... Télécharger