2020-06-01 21:43:16 +00:00
|
|
|
-- default
|
|
|
|
CREATE QUOTA q1_01297
|
|
|
|
-- same as default
|
|
|
|
CREATE QUOTA q2_01297
|
|
|
|
CREATE QUOTA q3_01297
|
|
|
|
CREATE QUOTA q4_01297
|
|
|
|
-- rename
|
|
|
|
CREATE QUOTA q2_01297_renamed
|
|
|
|
-- key
|
|
|
|
CREATE QUOTA q1_01297
|
|
|
|
CREATE QUOTA q2_01297 KEYED BY user_name
|
|
|
|
CREATE QUOTA q3_01297 KEYED BY ip_address
|
|
|
|
CREATE QUOTA q4_01297 KEYED BY client_key
|
|
|
|
CREATE QUOTA q5_01297 KEYED BY client_key, user_name
|
|
|
|
CREATE QUOTA q6_01297 KEYED BY client_key, ip_address
|
|
|
|
CREATE QUOTA q7_01297
|
|
|
|
CREATE QUOTA q8_01297 KEYED BY user_name
|
|
|
|
CREATE QUOTA q9_01297 KEYED BY ip_address
|
|
|
|
CREATE QUOTA q10_01297 KEYED BY client_key
|
|
|
|
CREATE QUOTA q11_01297 KEYED BY client_key, user_name
|
|
|
|
CREATE QUOTA q12_01297 KEYED BY client_key, ip_address
|
|
|
|
CREATE QUOTA q1_01297 KEYED BY user_name
|
|
|
|
CREATE QUOTA q2_01297 KEYED BY client_key, user_name
|
|
|
|
CREATE QUOTA q3_01297
|
|
|
|
-- intervals
|
|
|
|
CREATE QUOTA q1_01297 FOR INTERVAL 5 day MAX errors = 3
|
|
|
|
CREATE QUOTA q2_01297 FOR INTERVAL 30 minute MAX errors = 4
|
|
|
|
CREATE QUOTA q3_01297 FOR INTERVAL 1 hour MAX errors = 5
|
|
|
|
CREATE QUOTA q4_01297 FOR INTERVAL 2000 second MAX errors = 5
|
|
|
|
CREATE QUOTA q5_01297 FOR RANDOMIZED INTERVAL 1 year MAX queries = 100, errors = 11
|
|
|
|
CREATE QUOTA q6_01297 FOR INTERVAL 2 month MAX queries = 100, errors = 11, result_rows = 1000, result_bytes = 10000, read_rows = 1001, read_bytes = 10001, execution_time = 2.5
|
|
|
|
CREATE QUOTA q7_01297 FOR INTERVAL 1 quarter MAX queries = 100, errors = 11
|
|
|
|
CREATE QUOTA q8_01297 FOR INTERVAL 2 month MAX result_rows = 1002, FOR INTERVAL 2 quarter MAX queries = 100, errors = 11
|
|
|
|
CREATE QUOTA q1_01297
|
|
|
|
CREATE QUOTA q2_01297 FOR INTERVAL 30 minute TRACKING ONLY
|
|
|
|
CREATE QUOTA q3_01297 FOR INTERVAL 1 hour MAX queries = 70, FOR INTERVAL 2 hour MAX errors = 10
|
|
|
|
CREATE QUOTA q4_01297 FOR RANDOMIZED INTERVAL 2000 second MAX errors = 5
|
|
|
|
CREATE QUOTA q5_01297 FOR INTERVAL 1 year MAX errors = 111
|
|
|
|
-- to roles
|
|
|
|
CREATE QUOTA q1_01297
|
|
|
|
CREATE QUOTA q2_01297 TO ALL
|
|
|
|
CREATE QUOTA q3_01297 TO r1_01297
|
|
|
|
CREATE QUOTA q4_01297 TO u1_01297
|
|
|
|
CREATE QUOTA q5_01297 TO r1_01297, u1_01297
|
|
|
|
CREATE QUOTA q6_01297 TO ALL EXCEPT r1_01297
|
|
|
|
CREATE QUOTA q7_01297 TO ALL EXCEPT r1_01297, u1_01297
|
|
|
|
CREATE QUOTA q1_01297 TO u1_01297
|
|
|
|
CREATE QUOTA q2_01297
|
|
|
|
-- multiple quotas in one command
|
|
|
|
CREATE QUOTA q1_01297 FOR INTERVAL 1 day MAX errors = 5
|
|
|
|
CREATE QUOTA q2_01297 FOR INTERVAL 1 day MAX errors = 5
|
|
|
|
CREATE QUOTA q1_01297 FOR INTERVAL 1 day TRACKING ONLY TO r1_01297
|
|
|
|
CREATE QUOTA q2_01297 FOR INTERVAL 1 day TRACKING ONLY TO r1_01297
|
|
|
|
-- system.quotas
|
2023-07-11 23:58:28 +00:00
|
|
|
q1_01297 local_directory ['user_name'] [] 0 ['r1_01297'] []
|
|
|
|
q2_01297 local_directory [] [5259492] 0 ['r1_01297','u1_01297'] []
|
|
|
|
q3_01297 local_directory ['client_key','user_name'] [5259492,15778476] 0 [] []
|
|
|
|
q4_01297 local_directory [] [604800] 1 [] ['u1_01297']
|
2020-06-01 21:43:16 +00:00
|
|
|
-- system.quota_limits
|
2022-03-30 11:32:08 +00:00
|
|
|
q2_01297 5259492 0 100 \N \N 11 1000 10000 1001 10001 2.5 \N
|
|
|
|
q3_01297 5259492 0 \N \N \N \N 1002 \N \N \N \N \N
|
|
|
|
q3_01297 15778476 0 100 \N \N 11 \N \N \N \N \N \N
|
|
|
|
q4_01297 604800 0 \N \N \N \N \N \N \N \N \N \N
|
2021-01-26 08:11:46 +00:00
|
|
|
-- query_selects query_inserts
|
|
|
|
CREATE QUOTA q1_01297 KEYED BY user_name FOR INTERVAL 1 minute MAX query_selects = 1 TO r1_01297
|
|
|
|
CREATE QUOTA q2_01297 KEYED BY user_name FOR INTERVAL 1 minute MAX query_inserts = 1 TO r1_01297
|
2023-04-27 12:27:00 +00:00
|
|
|
-- size suffix
|
|
|
|
-- functional test
|
|
|
|
CREATE QUOTA q1_01297 FOR INTERVAL 1 minute MAX query_selects = 12000
|
|
|
|
CREATE QUOTA q2_01297 FOR INTERVAL 1 minute MAX query_selects = 12288
|
|
|
|
CREATE QUOTA q3_01297 FOR INTERVAL 1 minute MAX query_selects = 12000000
|
|
|
|
CREATE QUOTA q4_01297 FOR INTERVAL 1 minute MAX query_selects = 12582912
|
|
|
|
CREATE QUOTA q5_01297 FOR INTERVAL 1 minute MAX query_selects = 12000000000
|
|
|
|
CREATE QUOTA q6_01297 FOR INTERVAL 1 minute MAX query_selects = 12884901888
|
|
|
|
CREATE QUOTA q7_01297 FOR INTERVAL 1 minute MAX query_selects = 12000000000000
|
|
|
|
CREATE QUOTA q8_01297 FOR INTERVAL 1 minute MAX query_selects = 13194139533312
|
|
|
|
CREATE QUOTA q9_01297 FOR INTERVAL 1 minute MAX execution_time = 12000
|
|
|
|
CREATE QUOTA q10_01297 FOR INTERVAL 1 minute MAX execution_time = 12288
|
|
|
|
CREATE QUOTA q11_01297 FOR INTERVAL 1 minute MAX execution_time = 12000000
|
|
|
|
CREATE QUOTA q12_01297 FOR INTERVAL 1 minute MAX execution_time = 12582912
|
|
|
|
CREATE QUOTA q13_01297 FOR INTERVAL 1 minute MAX execution_time = 12000000000
|
|
|
|
CREATE QUOTA q14_01297 FOR INTERVAL 1 minute MAX execution_time = 12884901888
|
2023-05-11 12:04:53 +00:00
|
|
|
CREATE QUOTA q15_01297 FOR INTERVAL 1 minute MAX query_selects = 1
|
|
|
|
CREATE QUOTA q16_01297 FOR INTERVAL 1 minute MAX execution_time = 1.5
|
2023-04-27 12:27:00 +00:00
|
|
|
-- overflow test
|
|
|
|
CREATE QUOTA q1_01297 FOR INTERVAL 1 minute MAX query_selects = 18446744073709551615
|
|
|
|
CREATE QUOTA q2_01297 FOR INTERVAL 1 minute MAX execution_time = 18446744073
|
|
|
|
-- zero test
|
|
|
|
CREATE QUOTA q1_01297 FOR INTERVAL 1 minute MAX query_selects = 0
|
|
|
|
CREATE QUOTA q2_01297 FOR INTERVAL 1 minute MAX execution_time = 0
|
|
|
|
-- underflow test
|
|
|
|
-- syntax test
|
|
|
|
CREATE QUOTA q1_01297 FOR INTERVAL 1 minute MAX query_selects = 12
|
|
|
|
CREATE QUOTA q2_01297 FOR INTERVAL 1 minute MAX execution_time = 12
|
|
|
|
CREATE QUOTA q3_01297 FOR INTERVAL 1 minute MAX query_selects = 12000
|
|
|
|
CREATE QUOTA q4_01297 FOR INTERVAL 1 minute MAX execution_time = 12000
|
|
|
|
CREATE QUOTA q5_01297 FOR INTERVAL 1 minute MAX execution_time = 0
|
|
|
|
CREATE QUOTA q6_01297 FOR INTERVAL 1 minute MAX execution_time = 0
|
|
|
|
CREATE QUOTA q7_01297 FOR INTERVAL 1 minute MAX execution_time = 0
|
|
|
|
CREATE QUOTA q8_01297 FOR INTERVAL 1 minute MAX execution_time = 0
|
|
|
|
CREATE QUOTA q9_01297 FOR INTERVAL 1 minute MAX execution_time = 123000
|
|
|
|
CREATE QUOTA q10_01297 FOR INTERVAL 1 minute MAX execution_time = 123000
|
|
|
|
-- bad syntax test
|