mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Minor improvements to options error handling
- Add additional MTRs for more coverage on invalid options - Updating a few error messages to be more informative - Use the exit code from handle_options() when there is an error processing user options All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
This commit is contained in:
@ -25,7 +25,7 @@ mkdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;
|
||||
|
||||
|
||||
--echo Test bad binlog format.
|
||||
--error 1
|
||||
--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
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ mkdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;
|
||||
|
||||
|
||||
--echo Test non-numeric value passed to number option.
|
||||
--error 1
|
||||
--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
|
||||
|
||||
|
||||
@ -60,8 +60,8 @@ mkdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;
|
||||
--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 1
|
||||
--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 >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
|
||||
--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
|
||||
@ -69,10 +69,14 @@ mkdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;
|
||||
--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=Incorrect integer value: '18446744073709551616'
|
||||
--let SEARCH_PATTERN=Integer value out of range for uint64: '18446744073709551616'
|
||||
--source include/search_pattern_in_file.inc
|
||||
--let SEARCH_PATTERN=Error while setting value '18446744073709551616' to '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
|
||||
|
||||
#
|
||||
# Test that an wrong option with --help --verbose gives an error
|
||||
|
Reference in New Issue
Block a user