Skip to content

Commit 44a1da5

Browse files
AliSQLAliSQL
authored andcommitted
[Feature] Issue#6 SQL FILTER
Summary: -------- This feature limit queries of SQL which contains key words. Only SELECT, UPDATE, DELETE can be limited. Usage: ------ add a rule limit SELECT: SET GLOBAL sql_select_filter = '+,{CONC},KEY1~KEY2~KEY3...'; keys seperated with '~' example: SET GLOBAL sql_select_filter = '+,1,t1~t2~t3' SQL contains 't1','t2','t3' can only have one conncetion at the same time sql_update_filter and sql_delete_filter for UPDATE and DELETE show rules: SHOW SQL_FILTERS; select * from information_schema.sql_filter_info; result example: TYPE ITEM_ID CUR_CONC MAX_CONC KEY_NUM KEY_STR SELECT 2 0 0 2 +,0,a=1~a=2 SELECT 1 0 1 2 +,1,a=1~a=2 delete rules: SET GLOBAL sql_select_filter = '-,ITEM_ID1,ITEM_ID2,.....'; delete all rules: SET GLOBAL reset_all_filter = 1;
1 parent 97d77c9 commit 44a1da5

25 files changed

Lines changed: 1384 additions & 8 deletions

mysql-test/r/information_schema.result

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ SCHEMATA
7676
SCHEMA_PRIVILEGES
7777
SESSION_STATUS
7878
SESSION_VARIABLES
79+
SQL_FILTER_INFO
7980
STATISTICS
8081
TABLES
8182
TABLESPACES
@@ -905,7 +906,7 @@ table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest')
905906
AND table_name not like 'ndb%' AND table_name not like 'innodb_%'
906907
GROUP BY TABLE_SCHEMA;
907908
table_schema count(*)
908-
information_schema 33
909+
information_schema 34
909910
mysql 25
910911
create table t1 (i int, j int);
911912
create trigger trg1 before insert on t1 for each row
@@ -1369,6 +1370,7 @@ SCHEMATA information_schema.SCHEMATA 1
13691370
SCHEMA_PRIVILEGES information_schema.SCHEMA_PRIVILEGES 1
13701371
SESSION_STATUS information_schema.SESSION_STATUS 1
13711372
SESSION_VARIABLES information_schema.SESSION_VARIABLES 1
1373+
SQL_FILTER_INFO information_schema.SQL_FILTER_INFO 1
13721374
STATISTICS information_schema.STATISTICS 1
13731375
TABLES information_schema.TABLES 1
13741376
TABLESPACES information_schema.TABLESPACES 1

mysql-test/r/information_schema_db.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SCHEMATA
2828
SCHEMA_PRIVILEGES
2929
SESSION_STATUS
3030
SESSION_VARIABLES
31+
SQL_FILTER_INFO
3132
STATISTICS
3233
TABLES
3334
TABLESPACES

mysql-test/r/mysqld--help-notwin.result

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,9 +719,20 @@ The following options may be given as the first argument:
719719
--range-alloc-block-size=#
720720
Allocation block size for storing ranges during
721721
optimization
722+
--rds-filter-key-cmp-in-order
723+
If enabled, then match keys stored in filter list in
724+
order
722725
--rds-indexstat Control INDEX_STATISTICS
726+
--rds-reset-all-filter
727+
Delete all sql filters immediately
728+
--rds-sql-delete-filter=name
729+
Used to add/remove a SQL filter item for DELETE
723730
--rds-sql-max-iops=#
724731
restrict the sql physical iops when sql executing.
732+
--rds-sql-select-filter=name
733+
Used to add/remove a SQL filter item for SELECT
734+
--rds-sql-update-filter=name
735+
Used to add/remove a SQL filter item for UPDATE
725736
--rds-tablestat Control TABLE_STATISTICS
726737
--rds-threads-running-ctl-mode=name
727738
Control which statements will be affected by threads
@@ -1242,7 +1253,7 @@ performance-schema-max-rwlock-instances -1
12421253
performance-schema-max-socket-classes 10
12431254
performance-schema-max-socket-instances -1
12441255
performance-schema-max-stage-classes 150
1245-
performance-schema-max-statement-classes 168
1256+
performance-schema-max-statement-classes 169
12461257
performance-schema-max-table-handles -1
12471258
performance-schema-max-table-instances -1
12481259
performance-schema-max-thread-classes 50
@@ -1263,8 +1274,13 @@ query-cache-type OFF
12631274
query-cache-wlock-invalidate FALSE
12641275
query-prealloc-size 8192
12651276
range-alloc-block-size 4096
1277+
rds-filter-key-cmp-in-order FALSE
12661278
rds-indexstat FALSE
1279+
rds-reset-all-filter FALSE
1280+
rds-sql-delete-filter (No default value)
12671281
rds-sql-max-iops 0
1282+
rds-sql-select-filter (No default value)
1283+
rds-sql-update-filter (No default value)
12681284
rds-tablestat FALSE
12691285
rds-threads-running-ctl-mode SELECTS
12701286
rds-threads-running-high-watermark 151

mysql-test/r/mysqlshow.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Database: information_schema
102102
| SCHEMA_PRIVILEGES |
103103
| SESSION_STATUS |
104104
| SESSION_VARIABLES |
105+
| SQL_FILTER_INFO |
105106
| STATISTICS |
106107
| TABLES |
107108
| TABLESPACES |
@@ -169,6 +170,7 @@ Database: INFORMATION_SCHEMA
169170
| SCHEMA_PRIVILEGES |
170171
| SESSION_STATUS |
171172
| SESSION_VARIABLES |
173+
| SQL_FILTER_INFO |
172174
| STATISTICS |
173175
| TABLES |
174176
| TABLESPACES |

mysql-test/suite/funcs_1/r/is_columns_is.result

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ def information_schema SESSION_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NU
250250
def information_schema SESSION_STATUS VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select
251251
def information_schema SESSION_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
252252
def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select
253+
def information_schema SQL_FILTER_INFO CUR_CONC 3 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
254+
def information_schema SQL_FILTER_INFO ITEM_ID 2 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
255+
def information_schema SQL_FILTER_INFO KEY_NUM 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
256+
def information_schema SQL_FILTER_INFO KEY_STR 6 NO varchar 10240 30720 NULL NULL NULL utf8 utf8_general_ci varchar(10240) select
257+
def information_schema SQL_FILTER_INFO MAX_CONC 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select
258+
def information_schema SQL_FILTER_INFO TYPE 1 NO varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select
253259
def information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select
254260
def information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL NULL utf8 utf8_general_ci varchar(1) select
255261
def information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -658,6 +664,12 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet
658664
3.0000 information_schema SESSION_STATUS VARIABLE_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
659665
3.0000 information_schema SESSION_VARIABLES VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
660666
3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
667+
3.0000 information_schema SQL_FILTER_INFO TYPE varchar 21 63 utf8 utf8_general_ci varchar(21)
668+
NULL information_schema SQL_FILTER_INFO ITEM_ID bigint NULL NULL NULL NULL bigint(21) unsigned
669+
NULL information_schema SQL_FILTER_INFO CUR_CONC bigint NULL NULL NULL NULL bigint(21) unsigned
670+
NULL information_schema SQL_FILTER_INFO MAX_CONC bigint NULL NULL NULL NULL bigint(21) unsigned
671+
NULL information_schema SQL_FILTER_INFO KEY_NUM bigint NULL NULL NULL NULL bigint(21) unsigned
672+
3.0000 information_schema SQL_FILTER_INFO KEY_STR varchar 10240 30720 utf8 utf8_general_ci varchar(10240)
661673
3.0000 information_schema STATISTICS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
662674
3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
663675
3.0000 information_schema STATISTICS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)

mysql-test/suite/funcs_1/r/is_tables_is.result

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,29 @@ user_comment
544544
Separator -----------------------------------------------------
545545
TABLE_CATALOG def
546546
TABLE_SCHEMA information_schema
547+
TABLE_NAME SQL_FILTER_INFO
548+
TABLE_TYPE SYSTEM VIEW
549+
ENGINE MEMORY
550+
VERSION 10
551+
ROW_FORMAT Fixed
552+
TABLE_ROWS #TBLR#
553+
AVG_ROW_LENGTH #ARL#
554+
DATA_LENGTH #DL#
555+
MAX_DATA_LENGTH #MDL#
556+
INDEX_LENGTH #IL#
557+
DATA_FREE #DF#
558+
AUTO_INCREMENT NULL
559+
CREATE_TIME #CRT#
560+
UPDATE_TIME #UT#
561+
CHECK_TIME #CT#
562+
TABLE_COLLATION utf8_general_ci
563+
CHECKSUM NULL
564+
CREATE_OPTIONS #CO#
565+
TABLE_COMMENT #TC#
566+
user_comment
567+
Separator -----------------------------------------------------
568+
TABLE_CATALOG def
569+
TABLE_SCHEMA information_schema
547570
TABLE_NAME STATISTICS
548571
TABLE_TYPE SYSTEM VIEW
549572
ENGINE MEMORY
@@ -1297,6 +1320,29 @@ user_comment
12971320
Separator -----------------------------------------------------
12981321
TABLE_CATALOG def
12991322
TABLE_SCHEMA information_schema
1323+
TABLE_NAME SQL_FILTER_INFO
1324+
TABLE_TYPE SYSTEM VIEW
1325+
ENGINE MEMORY
1326+
VERSION 10
1327+
ROW_FORMAT Fixed
1328+
TABLE_ROWS #TBLR#
1329+
AVG_ROW_LENGTH #ARL#
1330+
DATA_LENGTH #DL#
1331+
MAX_DATA_LENGTH #MDL#
1332+
INDEX_LENGTH #IL#
1333+
DATA_FREE #DF#
1334+
AUTO_INCREMENT NULL
1335+
CREATE_TIME #CRT#
1336+
UPDATE_TIME #UT#
1337+
CHECK_TIME #CT#
1338+
TABLE_COLLATION utf8_general_ci
1339+
CHECKSUM NULL
1340+
CREATE_OPTIONS #CO#
1341+
TABLE_COMMENT #TC#
1342+
user_comment
1343+
Separator -----------------------------------------------------
1344+
TABLE_CATALOG def
1345+
TABLE_SCHEMA information_schema
13001346
TABLE_NAME STATISTICS
13011347
TABLE_TYPE SYSTEM VIEW
13021348
ENGINE MEMORY
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
drop table if exists t1;
2+
create table t1 (a int);
3+
insert into t1 values (1),(2);
4+
set global rds_sql_select_filter= "+";
5+
ERROR 42000: Variable 'rds_sql_select_filter' can't be set to the value of '+'
6+
set global rds_sql_select_filter= "+,1";
7+
ERROR 42000: Variable 'rds_sql_select_filter' can't be set to the value of '+,1'
8+
set global rds_sql_select_filter= "+,1,";
9+
ERROR 42000: Variable 'rds_sql_select_filter' can't be set to the value of '+,1,'
10+
set global rds_sql_select_filter= "+,1,~";
11+
ERROR 42000: Variable 'rds_sql_select_filter' can't be set to the value of '+,1,~'
12+
set global rds_sql_select_filter= "+,0,a=1~";
13+
ERROR 42000: Variable 'rds_sql_select_filter' can't be set to the value of '+,0,a=1~'
14+
set global rds_sql_update_filter= "+";
15+
ERROR 42000: Variable 'rds_sql_update_filter' can't be set to the value of '+'
16+
set global rds_sql_update_filter= "+,1";
17+
ERROR 42000: Variable 'rds_sql_update_filter' can't be set to the value of '+,1'
18+
set global rds_sql_update_filter= "+,1,";
19+
ERROR 42000: Variable 'rds_sql_update_filter' can't be set to the value of '+,1,'
20+
set global rds_sql_update_filter= "+,1,~";
21+
ERROR 42000: Variable 'rds_sql_update_filter' can't be set to the value of '+,1,~'
22+
set global rds_sql_update_filter= "+,0,a=1~";
23+
ERROR 42000: Variable 'rds_sql_update_filter' can't be set to the value of '+,0,a=1~'
24+
set global rds_sql_delete_filter= "+";
25+
ERROR 42000: Variable 'rds_sql_delete_filter' can't be set to the value of '+'
26+
set global rds_sql_delete_filter= "+,1";
27+
ERROR 42000: Variable 'rds_sql_delete_filter' can't be set to the value of '+,1'
28+
set global rds_sql_delete_filter= "+,1,";
29+
ERROR 42000: Variable 'rds_sql_delete_filter' can't be set to the value of '+,1,'
30+
set global rds_sql_delete_filter= "+,1,~";
31+
ERROR 42000: Variable 'rds_sql_delete_filter' can't be set to the value of '+,1,~'
32+
set global rds_sql_delete_filter= "+,0,a=1~";
33+
ERROR 42000: Variable 'rds_sql_delete_filter' can't be set to the value of '+,0,a=1~'
34+
set global rds_sql_select_filter= "+,1,a=1~a=2";
35+
show sql_filters;
36+
type item_id cur_conc max_conc key_num key_str
37+
SELECT 1 0 1 2 +,1,a=1~a=2
38+
select * from t1 where a=2 or a=1;
39+
a
40+
1
41+
2
42+
set global rds_sql_select_filter= "+,0,a=1~a=2";
43+
set global rds_sql_delete_filter= "+,0,a=1";
44+
set global rds_sql_update_filter= "+,0,a= 16~a= 1";
45+
show variables like 'rds_sql_%_filter';
46+
Variable_name Value
47+
rds_sql_delete_filter +,0,a=1
48+
rds_sql_select_filter +,0,a=1~a=2
49+
rds_sql_update_filter +,0,a= 16~a= 1
50+
select * from information_schema.sql_filter_info;
51+
TYPE ITEM_ID CUR_CONC MAX_CONC KEY_NUM KEY_STR
52+
SELECT 2 0 0 2 +,0,a=1~a=2
53+
SELECT 1 0 1 2 +,1,a=1~a=2
54+
UPDATE 4 0 0 2 +,0,a= 16~a= 1
55+
DELETE 3 0 0 1 +,0,a=1
56+
select * from t1 where a=2 or a=1;
57+
ERROR 70100: Query execution was interrupted
58+
update t1 set a= 16 where a= 1;
59+
ERROR 70100: Query execution was interrupted
60+
delete from t1 where a=1;
61+
ERROR 70100: Query execution was interrupted
62+
set global rds_filter_key_cmp_in_order = 1;
63+
select * from t1 where a=2 or a=1;
64+
a
65+
1
66+
2
67+
show sql_filters;
68+
type item_id cur_conc max_conc key_num key_str
69+
SELECT 2 0 0 2 +,0,a=1~a=2
70+
SELECT 1 0 1 2 +,1,a=1~a=2
71+
UPDATE 4 0 0 2 +,0,a= 16~a= 1
72+
DELETE 3 0 0 1 +,0,a=1
73+
set global rds_sql_select_filter= "-,1,2";
74+
show sql_filters;
75+
type item_id cur_conc max_conc key_num key_str
76+
UPDATE 4 0 0 2 +,0,a= 16~a= 1
77+
DELETE 3 0 0 1 +,0,a=1
78+
create table t2 (a int);
79+
set global rds_sql_update_filter= "+,0,t1~t2";
80+
update t1 as a,t2 as b set b.a=1 where a.a = b.a;
81+
ERROR 70100: Query execution was interrupted
82+
update t2 as b,t1 as a set b.a=1 where a.a = b.a;
83+
set global rds_sql_delete_filter= "+,0,t1~t2";
84+
delete a from t1 as a,t2 as b where a.a = b.a;
85+
ERROR 70100: Query execution was interrupted
86+
delete a from t2 as b,t1 as a where a.a = b.a;
87+
set global rds_reset_all_filter= 1;
88+
set global rds_sql_select_filter= "+,0,a=1";
89+
set global rds_sql_select_filter= "+,1,a=1";
90+
select * from t1 where a=1;
91+
a
92+
1
93+
set global rds_reset_all_filter= 1;
94+
set global rds_sql_select_filter= "+,1,a=1";
95+
set global rds_sql_select_filter= "+,0,a=1";
96+
select * from t1 where a=1;
97+
ERROR 70100: Query execution was interrupted
98+
set global rds_reset_all_filter= 1;
99+
set global rds_sql_select_filter= "+,1,a=1";
100+
select * from t1 where sleep(1)=1 and a=1;
101+
select * from information_schema.sql_filter_info;
102+
TYPE ITEM_ID CUR_CONC MAX_CONC KEY_NUM KEY_STR
103+
SELECT 11 1 1 1 +,1,a=1
104+
select * from t1 where a=1;
105+
ERROR 70100: Query execution was interrupted
106+
a
107+
set global rds_reset_all_filter= 1;
108+
set global rds_sql_update_filter= "+,1,a=1";
109+
update t1 set a=2 where sleep(1)=1 and a=1;
110+
select * from information_schema.sql_filter_info;
111+
TYPE ITEM_ID CUR_CONC MAX_CONC KEY_NUM KEY_STR
112+
UPDATE 12 1 1 1 +,1,a=1
113+
update t1 set a=1 where a=1;
114+
ERROR 70100: Query execution was interrupted
115+
set global rds_reset_all_filter= 1;
116+
set global rds_sql_delete_filter= "+,1,a=1";
117+
delete from t1 where sleep(1)=1 and a=1;
118+
select * from information_schema.sql_filter_info;
119+
TYPE ITEM_ID CUR_CONC MAX_CONC KEY_NUM KEY_STR
120+
DELETE 13 1 1 1 +,1,a=1
121+
delete from t1 where a=2 and a=1;
122+
ERROR 70100: Query execution was interrupted
123+
grant usage on test.* to user1@localhost;
124+
show sql_filters;
125+
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
126+
drop user user1@localhost;
127+
set global debug= "+d,sql_filter_fil_schema_error";
128+
select * from information_schema.sql_filter_info;
129+
ERROR HY000: Unknown error
130+
set global debug= default;
131+
set global rds_reset_all_filter= 0;
132+
set global rds_sql_select_filter= concat('+,1,', repeat('a', 10241));
133+
ERROR 42000: Variable 'rds_sql_select_filter' can't be set to the value of '+,1,aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
134+
set global rds_sql_select_filter= '+,a=1';
135+
ERROR 42000: Variable 'rds_sql_select_filter' can't be set to the value of '+,a=1'
136+
set global rds_sql_select_filter= '-,';
137+
ERROR 42000: Variable 'rds_sql_select_filter' can't be set to the value of '-,'
138+
set global rds_sql_select_filter= '-,a=1';
139+
ERROR 42000: Variable 'rds_sql_select_filter' can't be set to the value of '-,a=1'
140+
set global rds_sql_select_filter= '+,0,a=1';
141+
show sql_filters;
142+
type item_id cur_conc max_conc key_num key_str
143+
SELECT 14 0 0 1 +,0,a=1
144+
DELETE 13 0 1 1 +,1,a=1
145+
set global rds_sql_select_filter= '-,98,a=1';
146+
ERROR 42000: Variable 'rds_sql_select_filter' can't be set to the value of '-,98,a=1'
147+
set global rds_reset_all_filter= 1;
148+
set global rds_sql_select_filter= '-,99';
149+
set global debug= "+d,create_filter_item_error_0";
150+
set global rds_sql_select_filter= '+,0,a=1';
151+
ERROR HY000: Incorrect arguments to SET
152+
show sql_filters;
153+
type item_id cur_conc max_conc key_num key_str
154+
set global debug= default;
155+
set global debug= "+d,create_filter_item_error_1";
156+
set global rds_sql_select_filter= '+,0,a1~a2';
157+
ERROR HY000: Incorrect arguments to SET
158+
show sql_filters;
159+
type item_id cur_conc max_conc key_num key_str
160+
set global debug= default;
161+
set global debug= "+d,create_filter_item_error_2";
162+
set global rds_sql_select_filter= '+,0,a1~a2';
163+
ERROR HY000: Incorrect arguments to SET
164+
show sql_filters;
165+
type item_id cur_conc max_conc key_num key_str
166+
set global debug= default;
167+
set global debug= "+d,add_filter_item_error_0";
168+
set global rds_sql_select_filter= '+,0,a1~a2';
169+
ERROR HY000: Incorrect arguments to SET
170+
set global rds_sql_update_filter= '+,0,a1~a2';
171+
ERROR HY000: Incorrect arguments to SET
172+
set global rds_sql_delete_filter= '+,0,a1~a2';
173+
ERROR HY000: Incorrect arguments to SET
174+
show sql_filters;
175+
type item_id cur_conc max_conc key_num key_str
176+
set global debug= default;
177+
SET DEBUG_SYNC= 'find_matched_filter_and_update_after_get_cur_conc WAIT_FOR go';
178+
set global rds_sql_select_filter= '+,2,a1a1';
179+
show sql_filters;
180+
type item_id cur_conc max_conc key_num key_str
181+
SELECT 20 0 2 1 +,2,a1a1
182+
select 'a1a1';;
183+
select 'a1a1' or sleep(2);;
184+
show sql_filters;
185+
type item_id cur_conc max_conc key_num key_str
186+
SELECT 20 1 2 1 +,2,a1a1
187+
SET DEBUG_SYNC= 'now SIGNAL go';
188+
a1a1
189+
a1a1
190+
show sql_filters;
191+
type item_id cur_conc max_conc key_num key_str
192+
SELECT 20 1 2 1 +,2,a1a1
193+
set global rds_reset_all_filter= 1;
194+
'a1a1' or sleep(2)
195+
0
196+
Warnings:
197+
Warning 1292 Truncated incorrect DOUBLE value: 'a1a1'
198+
set global debug= "+d,check_lock_filter_list_sync";
199+
set global rds_sql_select_filter= '+,2,a1a1';
200+
show sql_filters;
201+
type item_id cur_conc max_conc key_num key_str
202+
SELECT 21 0 2 1 +,2,a1a1
203+
select 'a1a1';;
204+
set @tbegin = unix_timestamp(now());
205+
set global rds_sql_select_filter= '+,2,a2a2';
206+
set @tend = unix_timestamp(now());
207+
select @tend - @tbegin;
208+
@tend - @tbegin
209+
2
210+
a1a1
211+
a1a1
212+
set global debug= default;
213+
set global rds_sql_select_filter= '';
214+
set global rds_sql_update_filter= '';
215+
set global rds_sql_delete_filter= '';
216+
set global rds_reset_all_filter= 1;
217+
set global rds_filter_key_cmp_in_order = 0;
218+
drop table t1;
219+
drop table t2;

0 commit comments

Comments
 (0)