403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.68.164.134
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 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 : ON
Directory :  /www/server/mysql/src/mysql-test/suite/sys_vars/r/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/sys_vars/r/max_prepared_stmt_count_func.result
** Setup **

SET @global_max_prepared_stmt_count = @@global.max_prepared_stmt_count;
'#---------------------FN_DYNVARS_031_01----------------------#'
SET GLOBAL max_prepared_stmt_count=2;
** Prepare statements **
PREPARE stmt  from "SELECT * FROM information_schema.CHARACTER_SETS C";
PREPARE stmt1 from "SELECT * FROM information_schema.CHARACTER_SETS C";
PREPARE stmt2 from "SELECT * FROM information_schema.CHARACTER_SETS C";
ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 2)
Expected error "Max prepared statements count reached"
SHOW STATUS like 'Prepared_stmt_count';
Variable_name	Value
Prepared_stmt_count	2
2 Expected
'#---------------------FN_DYNVARS_031_02----------------------#'
SET GLOBAL max_prepared_stmt_count=0;
PREPARE stmt3  from "SELECT * FROM information_schema.CHARACTER_SETS C";
ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 0)
Expected error "Max prepared statements count reached"
SHOW STATUS like 'Prepared_stmt_count';
Variable_name	Value
Prepared_stmt_count	2
2 Expected
PREPARE stmt  from "SELECT * FROM information_schema.CHARACTER_SETS C";
ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 0)
Expected error "Max prepared statements count reached"
SHOW STATUS like 'Prepared_stmt_count';
Variable_name	Value
Prepared_stmt_count	1
2 Expected
'Bug#35389 A pre existing valid prepared statement DROPS if a PREPARE'
'STATEMENT command is issued with the same name that'
'causes ER_MAX_PREPARED_STMT_COUNT_REACHED error'
'#---------------------FN_DYNVARS_031_03----------------------#'
SHOW STATUS like 'Prepared_stmt_count';
Variable_name	Value
Prepared_stmt_count	1
SET GLOBAL max_prepared_stmt_count=4;
PREPARE stmt from "SELECT * FROM information_schema.CHARACTER_SETS C";
PREPARE stmt1 from "SELECT * FROM information_schema.CHARACTER_SETS C";
PREPARE stmt2 from "SELECT * FROM information_schema.CHARACTER_SETS C";
PREPARE stmt3 from "SELECT * FROM information_schema.CHARACTER_SETS C";
** Value of prepared stmt'
SHOW STATUS LIKE 'Prepared_stmt_count';
Variable_name	Value
Prepared_stmt_count	4
4 Expected
'#---------------------FN_DYNVARS_031_04----------------------#'
** preparing stmts **
PREPARE stmt from "SELECT * FROM information_schema.CHARACTER_SETS C";
PREPARE stmt1 from "SELECT * FROM information_schema.CHARACTER_SETS C";
PREPARE stmt2 from "SELECT * FROM information_schema.CHARACTER_SETS C";
** setting value **
SET GLOBAL max_prepared_stmt_count=3;
** Check wether any more statements can be  prepared **
PREPARE stmt5 from "SELECT * FROM information_schema.CHARACTER_SETS C";
ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 3)
Expected error "Max prepared statements count reached"
SHOW STATUS LIKE 'Prepared_stmt_count';
Variable_name	Value
Prepared_stmt_count	4
4 Expected
'#---------------------FN_DYNVARS_031_05----------------------#'
SET GLOBAL max_prepared_stmt_count=3;
** Creating procedure **
DROP PROCEDURE  IF EXISTS  sp_checkstmts;
Warnings:
Note	1305	PROCEDURE test.sp_checkstmts does not exist
CREATE PROCEDURE sp_checkstmts ()
BEGIN
PREPARE newstmt from "SELECT * FROM information_schema.CHARACTER_SETS C";
END //
CALL sp_checkstmts();
ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 3)
Expected error "Max prepared statements count reached"
DROP PREPARE stmt;
DROP PREPARE stmt1;
DROP PREPARE stmt2;
DROP PREPARE stmt3;
DROP PROCEDURE sp_checkstmts;
SET @@global.max_prepared_stmt_count = @global_max_prepared_stmt_count;

Youez - 2016 - github.com/yon3zu
LinuXploit