Server IP : 185.86.78.101 / Your IP : 216.73.216.213 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 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 : OFF Directory : /www/server/mysql/mysql-test/include/ |
Upload File : |
# ==== Purpose ==== # # Check if a condition holds, fail with debug info if not. # # The condition has the same form as expressions evaluated by include/eval.inc # # ==== Usage ==== # # --let $assert_text= Relay_Log_Pos must be between min_pos and max_pos # --let $assert_cond= [SHOW SLAVE STATUS, Relay_Log_Pos, 1] >= $min_pos AND <1> <= $max_pos # [--let $extra_debug_info= some text] # [--let $extra_debug_eval= expression parsable by include/eval.inc] # [--let $rpl_debug= 1] # --source include/assert.inc # # Parameters: # # $assert_text # Text that describes what is being checked. This text is written to # the query log so it should not contain non-deterministic elements. # # $assert_cond # Condition to check. See above for details about the format. The # condition will be executed as `SELECT $assert_cond`. # # Both $assert_cond and the result from any substatement on the # form [SQL_STATEMENT, COLUMN, ROW] will be used in SQL statements, # inside single quotes (as in '$assert_text'). So any single quotes # in these texts must be escaped or replaced by double quotes. # # $rpl_debug # Print extra debug info. # # $extra_debug_info, $extra_debug_eval # See include/show_rpl_debug_info.inc --let $include_filename= assert.inc [$assert_text] --source include/begin_include_file.inc if ($rpl_debug) { --echo # debug: assert_text='$assert_text' assert_cond='$assert_cond' } # Sanity-check input if (!$assert_text) { --die ERROR IN TEST: the mysqltest variable assert_text must be set } --let $_assert_old_eval_expr= $eval_expr --let $_assert_old_eval_result= $eval_result --let $_assert_old_eval_no_result= $eval_no_result --let $eval_expr= $assert_cond --source include/eval.inc # Check. if (!$eval_result) { --echo ######## Test assertion failed: $assert_text ######## --echo Dumping debug info: if ($show_rpl_debug_info) { --source include/show_rpl_debug_info.inc } --echo Assertion text: '$assert_text' --echo Assertion condition: '$assert_cond' --echo Assertion condition, interpolated: '$_eval_expr_interp' --echo Assertion result: '$eval_result' --die Test assertion failed in assert.inc } --let $include_filename= assert.inc [$assert_text] --source include/end_include_file.inc --let $assert_text= --let $assert_cond= --let $eval_expr= $_assert_old_eval_expr --let $eval_result= $_assert_old_eval_result --let $eval_no_result= $_assert_old_eval_no_result