403Webshell
Server IP : 104.21.38.3  /  Your IP : 104.23.175.224
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/perfschema/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/perfschema/t/status_reprepare.test
# Tests for PERFORMANCE_SCHEMA

--source include/no_protocol.inc
--source include/not_embedded.inc
--source include/have_perfschema.inc

--echo
--echo ================================================================================
--echo SETUP
--echo ================================================================================
--echo # Save current SHOW_COMPATIBILITY_56 setting
SELECT @@global.show_compatibility_56 INTO @show_compatibility_56_save;
SET @@global.show_compatibility_56=OFF;

# Create a new connection, to get clean statistics
connect(con1, localhost, root,,);

# Create a table
CREATE TABLE test.t1 (c1 INT);

#prepare a statement
PREPARE stmt1 FROM "SELECT c1 FROM test.t1";

#execute prepared statement;
EXECUTE stmt1;

# Check status from SHOW STATUS
SHOW SESSION STATUS LIKE "%com_stmt_%prepare%";

#check the statistics
SELECT * FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE "%com_stmt%";

SELECT VARIABLE_VALUE FROM performance_schema.global_status
  WHERE VARIABLE_NAME LIKE "Com_stmt_reprepare"
  INTO @count_global_reprepare_before;

# Alter table to make server reprepare the statement
ALTER TABLE test.t1 ADD COLUMN c2 INTEGER;

#execute prepared statement;
EXECUTE stmt1;

# Check status from SHOW STATUS
SHOW SESSION STATUS LIKE "%com_stmt_%prepare%";

#check the statistics
SELECT * FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE "%com_stmt%";

SELECT VARIABLE_VALUE FROM performance_schema.global_status
  WHERE VARIABLE_NAME LIKE "Com_stmt_reprepare"
  INTO @count_global_reprepare_after;

# Should increment by 1
SELECT @count_global_reprepare_after - @count_global_reprepare_before;

--echo
--echo ================================================================================
--echo CLEANUP
--echo ================================================================================

DROP TABLE test.t1;

--disconnect con1
--connection default

--echo # Restore SHOW_COMPATIBILITY_56 setting
SET @@global.show_compatibility_56 = @show_compatibility_56_save;

Youez - 2016 - github.com/yon3zu
LinuXploit