1# Embedded server doesn't support external clients
2--source include/not_embedded.inc
3#
4# Test "mysqladmin ping"
5#
6
7--exec $MYSQLADMIN --default-character-set=latin1 -S $MASTER_MYSOCK -P $MASTER_MYPORT  -u root --password= ping 2>&1
8
9
10#
11# Bug#10608 mysqladmin breaks on "database" variable in my.cnf
12#
13
14--replace_regex /.*mysqladmin.*: unknown/mysqladmin: unknown/
15--error 7
16--exec $MYSQLADMIN --database=db1 --default-character-set=latin1 -S $MASTER_MYSOCK -P $MASTER_MYPORT  -u root --password= ping 2>&1
17
18# When mysqladmin finds "loose-database" it shall print
19# a warning and continue
20--replace_regex /Warning: .*mysqladmin.*: unknown/Warning: mysqladmin: unknown/
21--exec $MYSQLADMIN --loose-database=db2 --default-character-set=latin1 -S $MASTER_MYSOCK -P $MASTER_MYPORT  -u root --password= ping 2>&1
22
23--echo #
24--echo # Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
25--echo #
26
27--echo # Executing mysqladmin with --sleep=1 and --count=2.
28--exec $MYSQLADMIN -u root -S $MASTER_MYSOCK -P $MASTER_MYPORT --sleep=1 --count=2 ping > $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
29--echo # Done.
30--echo # Displaying the output :
31--cat_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
32
33--remove_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
34
35--echo #
36--echo # BUG#11766184 - 59234: cmdline clients crash --defaults-extra-file
37--echo #                with no .cnf or .ini extension.
38--echo #
39
40--echo # Creating an empty file 'cnf_file'
41--write_file $MYSQLTEST_VARDIR/tmp/cnf_file
42EOF
43
44--echo # Using --defaults-extra-file option with 'cnf_file'.
45--exec $MYSQLADMIN --defaults-extra-file=$MYSQLTEST_VARDIR/tmp/cnf_file -uroot -S $MASTER_MYSOCK -P $MASTER_MYPORT ping 2>&1
46
47--remove_file $MYSQLTEST_VARDIR/tmp/cnf_file
48
49#
50# MDEV-7883 Segmentation failure when running mysqladmin -u root -p
51#
52--error 1
53--exec $MYSQLADMIN -u root -p 2>&1 > /dev/null
54