null+****@clear*****
null+****@clear*****
2012年 7月 9日 (月) 14:10:42 JST
Kouhei Sutou 2012-07-09 14:10:42 +0900 (Mon, 09 Jul 2012) New Revision: 1685532a1ee7a8e4a05d154715734374ab022588 https://github.com/groonga/groonga/commit/1685532a1ee7a8e4a05d154715734374ab022588 Log: Fix infinite loop problem for not implemented operator GRN_OP_NEAR doesn't implemented without index. This is a case of the problem. Added files: test/function/suite/select/filter/near/no_index.expected test/function/suite/select/filter/near/no_index.test Modified files: lib/expr.c Modified: lib/expr.c (+1 -0) =================================================================== --- lib/expr.c 2012-07-10 12:41:51 +0900 (4d5de6d) +++ lib/expr.c 2012-07-09 14:10:42 +0900 (bc24c8d) @@ -3338,6 +3338,7 @@ grn_expr_exec(grn_ctx *ctx, grn_obj *expr, int nargs) break; default : ERR(GRN_FUNCTION_NOT_IMPLEMENTED, "not implemented operator assigned"); + goto exit; break; } } Added: test/function/suite/select/filter/near/no_index.expected (+16 -0) 100644 =================================================================== --- /dev/null +++ test/function/suite/select/filter/near/no_index.expected 2012-07-09 14:10:42 +0900 (308d48b) @@ -0,0 +1,16 @@ +table_create Entries TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Entries content COLUMN_SCALAR Text +[[0,0.0,0.0],true] +load --table Entries +[ +{"content": "Welcome! This is my first post!"}, +{"content": "I started to use groonga. It's very fast!"}, +{"content": "I also started to use mroonga. It's also very fast! Really fast!"}, +{"content": "I also started to use mroonga. It's also very very fast!"}, +{"content": "I migrated all Senna system!"}, +{"content": "I also migrated all Tritonn system!"} +] +[[0,0.0,0.0],6] +select Entries --filter 'content *N "I fast"' --output_columns '_score, content' +[[[-38,0.0,0.0],"not implemented operator assigned"],[]] Added: test/function/suite/select/filter/near/no_index.test (+14 -0) 100644 =================================================================== --- /dev/null +++ test/function/suite/select/filter/near/no_index.test 2012-07-09 14:10:42 +0900 (0d94975) @@ -0,0 +1,14 @@ +table_create Entries TABLE_NO_KEY +column_create Entries content COLUMN_SCALAR Text + +load --table Entries +[ +{"content": "Welcome! This is my first post!"}, +{"content": "I started to use groonga. It's very fast!"}, +{"content": "I also started to use mroonga. It's also very fast! Really fast!"}, +{"content": "I also started to use mroonga. It's also very very fast!"}, +{"content": "I migrated all Senna system!"}, +{"content": "I also migrated all Tritonn system!"} +] + +select Entries --filter 'content *N "I fast"' --output_columns '_score, content' -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...下载