diff --git a/src/entry/Maat_hierarchy.cpp b/src/entry/Maat_hierarchy.cpp index d4e4b84..2664de1 100644 --- a/src/entry/Maat_hierarchy.cpp +++ b/src/entry/Maat_hierarchy.cpp @@ -95,7 +95,7 @@ struct Maat_hierarchy_clause struct Maat_hierarchy { pthread_rwlock_t rwlock; - time_t version; + time_t version; //After full update, clause id may indicate a different clause. Comparing hier->version and mid->hier_ver can prevent false positive match. struct bool_matcher* bm; struct Maat_hierarchy_compile* hash_compile_by_id; //key: compile_id, value: struct Maat_hierarchy_compile*. diff --git a/src/inc_internal/Maat_rule_internal.h b/src/inc_internal/Maat_rule_internal.h index bdf5c3a..839165c 100644 --- a/src/inc_internal/Maat_rule_internal.h +++ b/src/inc_internal/Maat_rule_internal.h @@ -160,7 +160,6 @@ struct Maat_region_inner int expr_id_cnt; int expr_id_lb; //low boundary int expr_id_ub; //up boundary - enum MAAT_TABLE_TYPE table_type; }; diff --git a/test/test_maatframe.cpp b/test/test_maatframe.cpp index 5fba454..c8f14fd 100644 --- a/test/test_maatframe.cpp +++ b/test/test_maatframe.cpp @@ -4048,16 +4048,19 @@ TEST_F(MaatCmdTest, SameScanStatusWhenClauseUpdate_TSG6419) //region11->group11--clause1-->compile1 - // / - //region21->group21--clause2--/ - // / - //region22->group22---/ + // / + //region21->group21--clause2---/ + // / + //region22->group22--clause3-/ + + Maat_command_raw_set_compile(feather, MAAT_OP_DEL, &compile1, compile_table_name, NULL, 2, 0, 0); + Maat_command_raw_set_compile(feather, MAAT_OP_ADD, &compile1, compile_table_name, NULL, 3, 0, 0); memset(&group22, 0, sizeof(group22)); group22.group_id=Maat_command_get_new_group_id(feather); group22.table_name=g2c_tn; group22.compile_id=compile1.config_id; - group22.clause_index=2; + group22.clause_index=3; Maat_command_raw_set_group2compile(feather, MAAT_OP_ADD, &group22); region22.region_id=Maat_command_get_new_region_id(feather); @@ -4069,6 +4072,10 @@ TEST_F(MaatCmdTest, SameScanStatusWhenClauseUpdate_TSG6419) sleep(1); table_id=Maat_table_register(feather, app_id_table_name); + + ret=Maat_scan_intval(feather, table_id, 31, result, 4, &mid, 0); + EXPECT_EQ(ret, -2); + ret=Maat_scan_intval(feather, table_id, scan_app_id, result, 4, &mid, 0); EXPECT_EQ(ret, 1); EXPECT_EQ(result[0].config_id, compile1.config_id);