403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/mysql-test/main/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/main/mysqld_option_err.test
#
# Test error checks on mysqld command line option parsing.
#
# Call mysqld with different invalid options, and check that it fails in each case.
#
# This means that a test failure results in mysqld starting up, which is only
# caught when the test case times out. This is not ideal, but I did not find an
# easy way to have the server shut down after a successful startup.
#

--source include/not_embedded.inc
--source include/have_example_plugin.inc

# mysqld refuses to run as root normally.
-- source include/not_as_root.inc

# We have not run (and do not need) bootstrap of the server. We just
# give it a dummy data directory (for log files etc).

mkdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;


--echo Test that unknown option is not silently ignored.
--error 2
--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --nonexistentoption >$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1


--echo Test bad binlog format.
--error 13
--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --log-bin --binlog-format=badformat >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1


--echo Test bad default storage engine.
--error 1
--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --default-storage-engine=nonexistentengine >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1


--echo Test non-numeric value passed to number option.
--error 9
--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables  --min-examined-row-limit=notanumber >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1


# Test for MBug#423035: error in parsing enum value for plugin
# variable in mysqld command-line option.
# See also Bug#32034.
--echo Test that bad value for plugin enum option is rejected correctly.
--error 1
--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --plugin-maturity=experimental --plugin-load=example=ha_example --plugin-example=FORCE --plugin-example-enum-var=noexist >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1

--let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log

--echo Test to see if multiple unknown options will be displayed in the error output
--error 7
--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --nonexistentoption2 --alsononexistent --nonexistentvariable=1 >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1

--let SEARCH_PATTERN=unknown option '--nonexistentoption2'
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=unknown option '--alsononexistent'
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=unknown variable 'nonexistentvariable=1'
--source include/search_pattern_in_file.inc

--echo Test to see if multiple ambiguous options and invalid arguments will be displayed in the error output
--error 9
--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --getopt-prefix-matching --sql-mode=invalid_value --character --bootstrap=partstoob --binlog_cache_size=18446744073709551616 --bulk_insert_buffer_size=123y >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1

--let SEARCH_PATTERN=Error while setting value 'invalid_value' to 'sql_mode'
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=ambiguous option '--character'
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=option '--bootstrap' cannot take an argument
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=Integer value out of range for uint64: '18446744073709551616' for binlog_cache_size
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=Unknown suffix 'y' used for variable 'bulk_insert_buffer_size' \(value '123y'\). Legal suffix characters are: K, M, G, T, P, E
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=Error while setting value '123y' to 'bulk_insert_buffer_size'
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=Error while setting value 'noexist' to 'plugin-example-enum-var'
--source include/search_pattern_in_file.inc


#
# Test that an wrong option with --help --verbose gives an error
#

--echo Test that --help --verbose works
--exec $MYSQLD_BOOTSTRAP_CMD --help --verbose >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
--echo Test that --not-known-option --help --verbose gives error
--error 2
--exec $MYSQLD_BOOTSTRAP_CMD --not-known-option --help --verbose >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1

rmdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;

--echo Done.

Youez - 2016 - github.com/yon3zu
LinuXploit