修复编码转换去重过程中引入的与表达式子项丢失的bug。
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
#include "mesa_fuzzy.h"
|
#include "mesa_fuzzy.h"
|
||||||
#include "great_index_engine.h"
|
#include "great_index_engine.h"
|
||||||
|
|
||||||
int MAAT_FRAME_VERSION_1_7_20160525=1;
|
int MAAT_FRAME_VERSION_1_8_20160603=1;
|
||||||
const char *maat_module="MAAT Frame";
|
const char *maat_module="MAAT Frame";
|
||||||
|
|
||||||
const char* CHARSET_STRING[]={"NONE","gbk","big5","unicode","utf8","bin",
|
const char* CHARSET_STRING[]={"NONE","gbk","big5","unicode","utf8","bin",
|
||||||
@@ -764,6 +764,7 @@ struct op_expr_t* create_op_expr(unsigned int expr_id,int operation,void* u_para
|
|||||||
{
|
{
|
||||||
struct op_expr_t* op_expr=NULL;
|
struct op_expr_t* op_expr=NULL;
|
||||||
op_expr=(struct op_expr_t*)calloc(sizeof(struct op_expr_t),1);
|
op_expr=(struct op_expr_t*)calloc(sizeof(struct op_expr_t),1);
|
||||||
|
op_expr->no_effect_convert_cnt=0;
|
||||||
op_expr->p_expr=(boolean_expr_t*)calloc(sizeof(boolean_expr_t),1);
|
op_expr->p_expr=(boolean_expr_t*)calloc(sizeof(boolean_expr_t),1);
|
||||||
op_expr->p_expr->expr_id=expr_id;
|
op_expr->p_expr->expr_id=expr_id;
|
||||||
op_expr->p_expr->operation=operation;
|
op_expr->p_expr->operation=operation;
|
||||||
@@ -1450,13 +1451,10 @@ int add_expr_rule(struct _Maat_table_info_t* table,struct db_str_rule_t* db_rule
|
|||||||
free(region_string);
|
free(region_string);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//if convert take no effect and src charset is one of the dst.
|
|
||||||
if(region_str_len==(int)strlen(sub_key_array[k])&&
|
if(region_str_len==(int)strlen(sub_key_array[k])&&
|
||||||
0==memcmp(sub_key_array[k],region_string,region_str_len)&&
|
0==memcmp(sub_key_array[k],region_string,region_str_len))
|
||||||
TRUE==table->src_charset_in_dst)
|
|
||||||
{
|
{
|
||||||
free(region_string);
|
op_expr->no_effect_convert_cnt++;;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1475,8 +1473,17 @@ int add_expr_rule(struct _Maat_table_info_t* table,struct db_str_rule_t* db_rule
|
|||||||
free(region_string);
|
free(region_string);
|
||||||
region_string=NULL;
|
region_string=NULL;
|
||||||
}
|
}
|
||||||
|
//if each sub string's convert take no effect and src charset is one of the dst.
|
||||||
|
if(TRUE==table->src_charset_in_dst&&op_expr->no_effect_convert_cnt==sub_expr_cnt)
|
||||||
|
{
|
||||||
|
destroy_op_expr(op_expr);
|
||||||
|
op_expr=NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
MESA_lqueue_join_tail(scanner->region_update_q,&op_expr, sizeof(void*));
|
MESA_lqueue_join_tail(scanner->region_update_q,&op_expr, sizeof(void*));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ struct op_expr_t
|
|||||||
{
|
{
|
||||||
boolean_expr_t* p_expr;
|
boolean_expr_t* p_expr;
|
||||||
scan_rule_t* p_rules[MAAT_MAX_EXPR_ITEM_NUM];
|
scan_rule_t* p_rules[MAAT_MAX_EXPR_ITEM_NUM];
|
||||||
|
int no_effect_convert_cnt;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Maat_region_rule_t
|
struct _Maat_region_rule_t
|
||||||
|
|||||||
Reference in New Issue
Block a user