Server IP : 104.21.38.3 / Your IP : 162.158.106.238 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 : |
# Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc --source include/have_perfschema.inc --source ../include/start_server_common.inc ############################# # Setup database and tables. ############################# --disable_warnings drop table if exists db1.t1; drop database if exists db1; --enable_warnings create database db1; create table db1.t1 (a int, b char(10) default 'default', unique key uidx(a)); ####################### # Execute few queries. ####################### insert into db1.t1 values('1', 'abc'); insert into db1.t1 values('2', 'abc'); select * from db1.t1 where a='1'; ##################################################### # Run few queries on Performance Schema stats tables. ##################################################### # There should be 3 entries in following table. 2 for insert and 1 for select. # This is because lock stats are still in the table handles select COUNT_STAR from performance_schema.table_io_waits_summary_by_table where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1'; # There should be 1 entry in following table. Thats is for select. # This is because lock stats are still in the table handles select COUNT_STAR from performance_schema.table_io_waits_summary_by_index_usage where INDEX_NAME!='NULL'; # Now force aggregation by closing table handles FLUSH TABLES; # Stats are now missing select COUNT_STAR from performance_schema.table_io_waits_summary_by_table where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1'; # Stats are now missing select COUNT_STAR from performance_schema.table_io_waits_summary_by_index_usage where INDEX_NAME!='NULL'; # Expect INDEX_STAT lost --disable_warnings select variable_value > 0 from information_schema.global_status where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST'; # While at it, check that FLUSH STATUS Resets the lost counter FLUSH STATUS; select variable_value from information_schema.global_status where variable_name like 'PERFORMANCE_SCHEMA_INDEX_STAT_LOST'; --enable_warnings ########### # Cleanup. ########### drop database db1;