test(parser): add hint for create quota overflow test

This commit is contained in:
Eridanus 2023-05-12 10:40:09 +08:00
parent 1340032c88
commit 8dc2cad027
2 changed files with 18 additions and 16 deletions

View File

@ -85,10 +85,9 @@ CREATE QUOTA q16_01297 FOR INTERVAL 1 minute MAX execution_time = 1.5
-- 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
CREATE QUOTA q1_01297 FOR INTERVAL 1 minute MAX query_selects = 0
CREATE QUOTA q2_01297 FOR INTERVAL 1 minute MAX execution_time = 9223372036.854776
CREATE QUOTA q3_01297 FOR INTERVAL 1 minute MAX execution_time = 9223372036.854776
CREATE QUOTA q4_01297 FOR INTERVAL 1 minute MAX execution_time = 9223372036.854776
-- FIXME
-- the overflow happens somewhere else before reaching the up bound of Quota Value , not in the parser
-- the overflow have different behavior in different environment
-- 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

View File

@ -197,18 +197,21 @@ SHOW CREATE QUOTA q1_01297;
SHOW CREATE QUOTA q2_01297;
DROP QUOTA IF EXISTS q1_01297;
DROP QUOTA IF EXISTS q2_01297;
CREATE QUOTA q1_01297 FOR INTERVAL 1 MINUTE MAX query_selects = '18446744073709551616';
CREATE QUOTA q2_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '1T';
CREATE QUOTA q3_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '1Ti';
CREATE QUOTA q4_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '18446744074';
SHOW CREATE QUOTA q1_01297;
SHOW CREATE QUOTA q2_01297;
SHOW CREATE QUOTA q3_01297;
SHOW CREATE QUOTA q4_01297;
DROP QUOTA IF EXISTS q1_01297;
DROP QUOTA IF EXISTS q2_01297;
DROP QUOTA IF EXISTS q3_01297;
DROP QUOTA IF EXISTS q4_01297;
SELECT '-- FIXME';
SELECT '-- the overflow happens somewhere else before reaching the up bound of Quota Value , not in the parser';
SELECT '-- the overflow have different behavior in different environment';
-- CREATE QUOTA q1_01297 FOR INTERVAL 1 MINUTE MAX query_selects = '18446744073709551616';
-- CREATE QUOTA q2_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '1T';
-- CREATE QUOTA q3_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '1Ti';
-- CREATE QUOTA q4_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '18446744074';
-- SHOW CREATE QUOTA q1_01297;
-- SHOW CREATE QUOTA q2_01297;
-- SHOW CREATE QUOTA q3_01297;
-- SHOW CREATE QUOTA q4_01297;
-- DROP QUOTA IF EXISTS q1_01297;
-- DROP QUOTA IF EXISTS q2_01297;
-- DROP QUOTA IF EXISTS q3_01297;
-- DROP QUOTA IF EXISTS q4_01297;
SELECT '-- 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';