Kouhei Sutou
null+****@clear*****
Mon Aug 29 17:57:30 JST 2016
Kouhei Sutou 2016-08-29 17:57:30 +0900 (Mon, 29 Aug 2016) New Revision: 389df89997752ea8c9870e20d10261c5f51602b6 https://github.com/groonga/groonga/commit/389df89997752ea8c9870e20d10261c5f51602b6 Message: Improve error message on dangling hook Modified files: lib/db.c Modified: lib/db.c (+12 -2) =================================================================== --- lib/db.c 2016-08-29 17:47:51 +0900 (111b15a) +++ lib/db.c 2016-08-29 17:57:30 +0900 (b06131a) @@ -8855,10 +8855,20 @@ remove_index(grn_ctx *ctx, grn_obj *obj, grn_hook_entry entry) if (!target) { char name[GRN_TABLE_MAX_KEY_SIZE]; int length; + char hook_name[GRN_TABLE_MAX_KEY_SIZE]; + int hook_name_length; + length = grn_obj_name(ctx, obj, name, GRN_TABLE_MAX_KEY_SIZE); - ERR(GRN_UNKNOWN_ERROR, + hook_name_length = grn_table_get_key(ctx, + ctx->impl->db, + data->target, + hook_name, + GRN_TABLE_MAX_KEY_SIZE); + ERR(GRN_OBJECT_CORRUPT, "[column][remove][index] " - "hook has a dangling reference: %.*s", length, name); + "hook has a dangling reference: <%.*s> -> <%.*s>", + length, name, + hook_name_length, hook_name); sub_rc = ctx->rc; } else if (target->header.type == GRN_COLUMN_INDEX) { //TODO: multicolumn MULTI_COLUMN_INDEXP -------------- next part -------------- HTML����������������������������... Download