Server IP : 172.67.216.182 / Your IP : 162.158.163.101 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/funcs_1/t/ |
Upload File : |
# suite/funcs_1/t/is_schemata_is_mysql_test.test # # Check the content of information_schema.schemata about the databases # information_schema and mysql visible to high and low privileged users. # # Author: # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of # testsuite funcs_1 # Create this script based on older scripts and new code. # # This test cannot be used for the embedded server because we check here # privileges. --source include/not_embedded.inc --echo ################################################################################# --echo # Testcases 3.2.9.2 + 3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information --echo ################################################################################# # 3.2.9.2 Ensure that the table shows the relevant information for every # database on which the current user or PUBLIC have privileges. # 3.2.9.3 Ensure that the table does not show any information on any databases # on which the current user and PUBLIC have no privileges. # --disable_warnings DROP DATABASE IF EXISTS db_datadict; --enable_warnings CREATE DATABASE db_datadict; # Create a low privileged user. # Note: The database db_datadict is just a "home" for the low privileged user # and not in the focus of testing. --error 0,ER_CANNOT_USER DROP USER 'testuser1'@'localhost'; CREATE USER 'testuser1'@'localhost'; GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; let $my_select = SELECT * FROM information_schema.schemata WHERE schema_name IN ('information_schema','mysql','test') ORDER BY schema_name; let $my_show1 = SHOW DATABASES LIKE 'information_schema'; let $my_show2 = SHOW DATABASES LIKE 'mysql'; let $my_show3 = SHOW DATABASES LIKE 'test'; eval $my_select; eval $my_show1; eval $my_show2; eval $my_show3; --echo # Establish connection testuser1 (user=testuser1) --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connect (testuser1, localhost, testuser1, , db_datadict); eval $my_select; eval $my_show1; eval $my_show2; eval $my_show3; # Cleanup --echo # Switch to connection default and close connection testuser1 connection default; DROP USER 'testuser1'@'localhost'; DROP DATABASE db_datadict;