mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
c262ccac02
AIX grep doesn't support the grep -A syntax used in the test case.
50 lines
1.9 KiB
Text
50 lines
1.9 KiB
Text
# BUG#58455
|
|
# Starting mysqld with defaults file without extension cause
|
|
# segmentation fault
|
|
|
|
source include/not_embedded.inc;
|
|
source include/not_windows.inc;
|
|
source include/not_aix.inc;
|
|
|
|
# All these tests refer to configuration files that do not exist
|
|
|
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
|
--error 1
|
|
exec $MYSQLD --defaults-file=/path/with/no/extension --print-defaults 2>&1;
|
|
|
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
|
--error 1
|
|
exec $MYSQLD --defaults-file=/path/with.ext --print-defaults 2>&1;
|
|
|
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
|
--error 1
|
|
exec $MYSQLD --defaults-file=relative/path/with.ext --print-defaults 2>&1;
|
|
|
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
|
--error 1
|
|
exec $MYSQLD --defaults-file=relative/path/without/extension --print-defaults 2>&1;
|
|
|
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
|
--error 1
|
|
exec $MYSQLD --defaults-file=with.ext --print-defaults 2>&1;
|
|
|
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
|
--error 1
|
|
exec $MYSQLD --defaults-file=no_extension --print-defaults 2>&1;
|
|
|
|
--echo #
|
|
--echo # MDEV-21374: When "--help --verbose" prints out configuration file paths,
|
|
--echo # the --defaults-file option is not considered
|
|
--echo #
|
|
|
|
--echo # Test on `defaults-file`
|
|
--replace_result $MYSQLTEST_REAL_VARDIR MYSQLTEST_VARDIR
|
|
exec $MYSQLD --defaults-file=$MYSQLTEST_VARDIR/my.cnf --help --verbose | grep -A 1 'Default options are read';
|
|
|
|
--echo # Test on `defaults-extra-file`
|
|
# <first-defaults> = `/etc/my.cnf /etc/mysql/my.cnf`
|
|
# Using sysconfdir configuration, we don't always have `/etc/mysql/my.cnf`, so replace them with a regex as well.
|
|
copy_file $MYSQLTEST_VARDIR/my.cnf $MYSQLTEST_VARDIR/my_test.cnf;
|
|
--replace_regex /.*my_test.cnf/<first-defaults> MYSQLTEST_VARDIR\/my_test.cnf/
|
|
exec $MYSQLD --defaults-extra-file=$MYSQLTEST_VARDIR/my_test.cnf --help --verbose | grep -A 1 'Default options are read';
|
|
remove_file $MYSQLTEST_VARDIR/my_test.cnf;
|