[Groonga-mysql-commit] mroonga/mroonga [master] fix wrong length calculation in the first "+" workaround in boolean mode.

アーカイブの一覧に戻る

null+****@clear***** null+****@clear*****
2011年 10月 22日 (土) 10:57:44 JST


Kouhei Sutou	2011-10-22 01:57:44 +0000 (Sat, 22 Oct 2011)

  New Revision: 837467ed9c64e8d50ef1a1e2ef7314e5fe1aea10

  Log:
    fix wrong length calculation in the first "+" workaround in boolean mode.
    
    Reported by 西山はじめ san. Thanks!!!

  Modified files:
    ha_mroonga.cc

  Modified: ha_mroonga.cc (+1 -1)
===================================================================
--- ha_mroonga.cc    2011-10-20 09:19:34 +0000 (84e2d72)
+++ ha_mroonga.cc    2011-10-22 01:57:44 +0000 (06990c5)
@@ -5182,7 +5182,7 @@ FT_INFO *ha_mroonga::generic_ft_init_ext(uint flags, uint key_nr, String *key)
     // WORKAROUND: ignore the first '+' to support "+apple macintosh" pattern.
     if (keyword_length > 0 && keyword[0] == '+') {
       keyword++;
-      keyword_length++;
+      keyword_length--;
     }
     grn_expr_flags expression_flags = GRN_EXPR_SYNTAX_QUERY;
     grn_rc rc;




Groonga-mysql-commit メーリングリストの案内
アーカイブの一覧に戻る