summaryrefslogtreecommitdiff
path: root/mysql-test/main/mysqld--help-aria.test
blob: 4082951b10a884f1c64511a9b0d8e28ad2938bab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
# Check errors from mysqld--help when providing different datadir
#

# We can't run this test on windows as windows doesn't provide file locking
# which the first exec requires.

--source include/not_windows.inc

--let $args=--table-cache=5 --max-connections=10 --log-warnings=1 --silent-startup --help --verbose

--exec $MYSQLD_CMD $args > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
--replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // /control file '.*aria_log_control'/aria_log_control/ /error: \d+/error: #/
--cat_file $MYSQL_TMP_DIR/mysqld--help2.err

--echo #
--echo # Check that we don't write any data to wrong or not existing datadir
--echo #

--exec $MYSQLD_CMD $args --datadir=$MYSQL_TMP_DIR/help > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
--replace_regex /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* //
--cat_file $MYSQL_TMP_DIR/mysqld--help2.err

--echo #
--echo # Check with existing directory
--echo #

--mkdir $MYSQL_TMP_DIR/help
--exec $MYSQLD_CMD $args --datadir=$MYSQL_TMP_DIR/help > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
--replace_regex /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* //
--cat_file $MYSQL_TMP_DIR/mysqld--help2.err
--list_files $MYSQL_TMP_DIR/help

#
# Cleanup
#
--rmdir $MYSQL_TMP_DIR/help
--remove_file $MYSQL_TMP_DIR/mysqld--help2.txt
--remove_file $MYSQL_TMP_DIR/mysqld--help2.err