Server IP : 172.67.216.182 / Your IP : 162.158.106.69 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 --disable_warnings drop table if exists test.setup_actors; --enable_warnings # Save the setup create table test.setup_actors as select * from performance_schema.setup_actors; # Inserting Duplicate values in the table should # throw error --error ER_DUP_KEY insert into performance_schema.setup_actors values ('%','%','%','YES', 'YES'); --error ER_DUP_KEY insert into performance_schema.setup_actors values ('%','%','%','NO', 'NO'); truncate table performance_schema.setup_actors; select * from performance_schema.setup_actors; select * from performance_schema.setup_actors where user = '%'; insert into performance_schema.setup_actors set user='Joe', host='localhost'; insert into performance_schema.setup_actors set user='Joe', host='%'; insert into performance_schema.setup_actors set user='%', host='server1'; insert into performance_schema.setup_actors set user='%', host='%'; # Insert with wrong value for ENABLED column --error 1265 insert into performance_schema.setup_actors values ('localhost', 'user1', '%', 'NO%', 'NO'); # Insert with wrong value for HISTORY column --error 1265 insert into performance_schema.setup_actors values ('localhost', 'user1', '%', 'NO', 'KO'); select * from performance_schema.setup_actors order by USER, HOST; --error ER_WRONG_PERFSCHEMA_USAGE update performance_schema.setup_actors set user='ILLEGAL'; --error ER_WRONG_PERFSCHEMA_USAGE update performance_schema.setup_actors set host='ILLEGAL'; --error ER_WRONG_PERFSCHEMA_USAGE update performance_schema.setup_actors set role='ILLEGAL'; # update on ENABLED column is allowed update performance_schema.setup_actors set ENABLED='YES'; # update on HISTORY column is allowed update performance_schema.setup_actors set HISTORY='YES'; # update on ENABLED column with wrong values #throws error --error 1265 update performance_schema.setup_actors set ENABLED=''; --error 1265 update performance_schema.setup_actors set ENABLED='YESS'; --error 1265 update performance_schema.setup_actors set ENABLED='NO%'; --error ER_BAD_NULL_ERROR update performance_schema.setup_actors set ENABLED=NULL; --error 1265 update performance_schema.setup_actors set HISTORY='YESS'; --error 1265 update performance_schema.setup_actors set HISTORY='NO%'; --error ER_BAD_NULL_ERROR update performance_schema.setup_actors set HISTORY=NULL; select * from performance_schema.setup_actors order by USER, HOST; delete from performance_schema.setup_actors where user = 'Joe' and host = 'localhost'; select * from performance_schema.setup_actors order by USER, HOST; delete from performance_schema.setup_actors; select * from performance_schema.setup_actors order by USER, HOST; LOCK TABLES performance_schema.setup_actors READ; UNLOCK TABLES; LOCK TABLES performance_schema.setup_actors WRITE; UNLOCK TABLES; --echo # --echo # WL#2284: Increase the length of a user name --echo # insert into performance_schema.setup_actors set user='user_name_len_22_01234', host='localhost'; delete from performance_schema.setup_actors where user = 'user_name_len_22_01234' and host = 'localhost'; # Restore the setup truncate table performance_schema.setup_actors; insert into performance_schema.setup_actors select * from test.setup_actors; drop table test.setup_actors;