null+****@clear*****
null+****@clear*****
2011年 11月 3日 (木) 15:36:32 JST
Kouhei Sutou 2011-11-03 06:36:32 +0000 (Thu, 03 Nov 2011)
New Revision: 3e2de350eb7e42644472b7d49b5efc48fe45eb64
Log:
clear column values only when deletion is succeeded.
Modified files:
lib/db.c
Modified: lib/db.c (+3 -1)
===================================================================
--- lib/db.c 2011-11-03 06:33:10 +0000 (c1ef21e)
+++ lib/db.c 2011-11-03 06:36:32 +0000 (7892c46)
@@ -1399,7 +1399,9 @@ _grn_table_delete_by_id(grn_ctx *ctx, grn_obj *table, grn_id id,
rc = grn_array_delete_by_id(ctx, (grn_array *)table, id, optarg);
break;
}
- clear_column_values(ctx, table, id);
+ if (rc == GRN_SUCCESS) {
+ clear_column_values(ctx, table, id);
+ }
}
}
return rc;