Server IP : 104.21.38.3 / Your IP : 172.70.188.162 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/audit_null/t/ |
Upload File : |
--source include/have_null_audit_plugin.inc --source include/not_embedded.inc --source include/no_protocol.inc call mtr.add_suppression("Event 'MYSQL_AUDIT_GENERAL_ERROR' cannot be aborted."); --replace_regex /\.dll/.so/ eval INSTALL PLUGIN null_audit SONAME '$AUDIT_NULL'; --echo ############# --echo ## PREPARE ## --echo ############# SET @@null_audit_event_order_check = 'MYSQL_AUDIT_COMMAND_START;command_id="3";;' 'MYSQL_AUDIT_PARSE_PREPARSE;;;' 'MYSQL_AUDIT_PARSE_POSTPARSE;;;' 'MYSQL_AUDIT_GENERAL_LOG;;;' 'MYSQL_AUDIT_QUERY_START;sql_command_id="99";;' 'MYSQL_AUDIT_PARSE_PREPARSE;;;' 'MYSQL_AUDIT_PARSE_POSTPARSE;;;' 'MYSQL_AUDIT_GENERAL_ERROR;;ABORT_RET'; --error ER_NO_SUCH_TABLE PREPARE stmt FROM 'SELECT * FROM mysql.non_existing_table'; SELECT @@null_audit_event_order_check; --echo ############# --echo ## EXECUTE ## --echo ############# CREATE TABLE test.test_table(a INT); PREPARE stmt FROM 'SELECT * FROM test.test_table'; DROP TABLE test.test_table; SET @@null_audit_event_order_check = 'MYSQL_AUDIT_COMMAND_START;command_id="3";;' 'MYSQL_AUDIT_PARSE_PREPARSE;;;' 'MYSQL_AUDIT_PARSE_POSTPARSE;;;' 'MYSQL_AUDIT_GENERAL_LOG;;;' 'MYSQL_AUDIT_QUERY_START;sql_command_id="100";;' 'MYSQL_AUDIT_GENERAL_LOG;;;' 'MYSQL_AUDIT_QUERY_START;sql_command_id="0";;' 'MYSQL_AUDIT_GENERAL_ERROR;;ABORT_RET'; --error ER_NO_SUCH_TABLE EXECUTE stmt; SELECT @@null_audit_event_order_check; DROP PREPARE stmt; --echo ####################################### --echo ## ABORT GENERAL LOG WITH MY_MESSAGE ## --echo ####################################### SET @@null_audit_abort_message = "Abort with my_message."; SET @@null_audit_event_order_check = 'MYSQL_AUDIT_COMMAND_START;command_id="3";;' 'MYSQL_AUDIT_PARSE_PREPARSE;;;' 'MYSQL_AUDIT_PARSE_POSTPARSE;;;' 'MYSQL_AUDIT_GENERAL_LOG;;;' 'MYSQL_AUDIT_QUERY_START;sql_command_id="99";;' 'MYSQL_AUDIT_PARSE_PREPARSE;;;' 'MYSQL_AUDIT_PARSE_POSTPARSE;;;' 'MYSQL_AUDIT_GENERAL_ERROR;;ABORT_RET'; --error ER_NO_SUCH_TABLE PREPARE stmt FROM 'SELECT * FROM mysql.non_existing_table'; SELECT @@null_audit_event_order_check; CREATE TABLE test.test_table(a INT); PREPARE stmt FROM 'SELECT * FROM test.test_table'; DROP TABLE test.test_table; SET @@null_audit_abort_message = "Abort with my_message."; SET @@null_audit_event_order_check = 'MYSQL_AUDIT_COMMAND_START;command_id="3";;' 'MYSQL_AUDIT_PARSE_PREPARSE;;;' 'MYSQL_AUDIT_PARSE_POSTPARSE;;;' 'MYSQL_AUDIT_GENERAL_LOG;;;' 'MYSQL_AUDIT_QUERY_START;sql_command_id="100";;' 'MYSQL_AUDIT_GENERAL_LOG;;;' 'MYSQL_AUDIT_QUERY_START;sql_command_id="0";;' 'MYSQL_AUDIT_GENERAL_ERROR;;ABORT_RET'; --error ER_NO_SUCH_TABLE EXECUTE stmt; SELECT @@null_audit_event_order_check; DROP PREPARE stmt; UNINSTALL PLUGIN null_audit;