fix extracting wrong query range with mutable function

This commit is contained in:
yinyj17
2023-07-28 03:54:39 +00:00
committed by ob-robot
parent c80c7a2b95
commit e05695e317
3 changed files with 66 additions and 63 deletions

View File

@ -679,31 +679,31 @@ all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,({"VARCHAR":"a", collation:"utf8mb4_general_ci"};MAX)"}]
f > 'a' and false--------------connection_collation = 45 col_type = 46
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
f > 'a' and false--------------connection_collation = 45 col_type = 63
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
f > 'a' and false--------------connection_collation = 46 col_type = 45
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
f > 'a' and false--------------connection_collation = 46 col_type = 46
is not min_to_max_range
ranges.count() = 1
@ -711,31 +711,31 @@ all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,({"VARCHAR":"a", collation:"utf8mb4_bin"};MAX)"}]
f > 'a' and false--------------connection_collation = 46 col_type = 63
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
f > 'a' and false--------------connection_collation = 63 col_type = 45
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
f > 'a' and false--------------connection_collation = 63 col_type = 46
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
f > 'a' and false--------------connection_collation = 63 col_type = 63
is not min_to_max_range
ranges.count() = 1
@ -743,7 +743,7 @@ all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,({"VARCHAR":"a", collation:"binary"};MAX)"}]
[11] false and f > 'a'
false and f > 'a'--------------connection_collation = 45 col_type = 45
@ -753,31 +753,31 @@ all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,({"VARCHAR":"a", collation:"utf8mb4_general_ci"};MAX)"}]
false and f > 'a'--------------connection_collation = 45 col_type = 46
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
false and f > 'a'--------------connection_collation = 45 col_type = 63
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
false and f > 'a'--------------connection_collation = 46 col_type = 45
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
false and f > 'a'--------------connection_collation = 46 col_type = 46
is not min_to_max_range
ranges.count() = 1
@ -785,31 +785,31 @@ all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,({"VARCHAR":"a", collation:"utf8mb4_bin"};MAX)"}]
false and f > 'a'--------------connection_collation = 46 col_type = 63
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
false and f > 'a'--------------connection_collation = 63 col_type = 45
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
false and f > 'a'--------------connection_collation = 63 col_type = 46
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
false and f > 'a'--------------connection_collation = 63 col_type = 63
is not min_to_max_range
ranges.count() = 1
@ -817,7 +817,7 @@ all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,({"VARCHAR":"a", collation:"binary"};MAX)"}]
[12] f < 'a' or f > 'b' or f > 'sda' and f > 'sds' or f = 'adas'
f < 'a' or f > 'b' or f > 'sda' and f > 'sds' or f = 'adas'--------------connection_collation = 45 col_type = 45
@ -1375,13 +1375,13 @@ end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
f > 'B' and 'a' = 'A'--------------connection_collation = 46 col_type = 45
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
f > 'B' and 'a' = 'A'--------------connection_collation = 46 col_type = 46
is not min_to_max_range
ranges.count() = 1
@ -1389,31 +1389,31 @@ all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,({"VARCHAR":"B", collation:"utf8mb4_bin"};MAX)"}]
f > 'B' and 'a' = 'A'--------------connection_collation = 46 col_type = 63
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
f > 'B' and 'a' = 'A'--------------connection_collation = 63 col_type = 45
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
f > 'B' and 'a' = 'A'--------------connection_collation = 63 col_type = 46
is not min_to_max_range
is min_to_max_range
ranges.count() = 1
all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,(MIN;MAX)"}]
f > 'B' and 'a' = 'A'--------------connection_collation = 63 col_type = 63
is not min_to_max_range
ranges.count() = 1
@ -1421,7 +1421,7 @@ all_single_value_ranges = 0
star_border_flag[0] = 0
end_border_flag[0] = 0
count of rang columns = 1
[{"range":"table_id:3003,group_idx:0,(MAX;MIN)"}]
[{"range":"table_id:3003,group_idx:0,({"VARCHAR":"B", collation:"binary"};MAX)"}]
[20] #(f, g) in (('a', 'b'), ('B', 'A'))
[21] #(f, g) > ('a', 'b') and (f, g) < ('B', 'A')