1--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
2--shutdown_server
3--source include/wait_until_disconnected.inc
4
5--perl
6use File::Path 'rmtree';
7$DDIR=$ENV{"MYSQL_TMP_DIR"}."/installdb_test";
8rmtree([ "$DDIR" ]);
9EOF
10
11--echo # Execution of mysql_install_db starts............
12--exec $MYSQL_INSTALL_DB --defaults-file=$MYSQL_TEST_DIR/t/m_i_db_config.cnf --mysqld-file=$MYSQLD --loose-ssl-setup-file=$MYSQL_SSL_RSA_SETUP --datadir=$DDIR --basedir=$BASEDIR --lc_messages_dir=$MYSQL_SHAREDIR --extra-sql-file=$MYSQL_TEST_DIR/t/m_i_db_createschema.sql $midparam > $MYSQLTEST_VARDIR/tmp/m_i_db.out 2>&1
13--echo # Execution of mysql_install_db ends..............
14--exec echo "restart:--datadir=$DDIR " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
15--enable_reconnect
16--source include/wait_until_connected_again.inc
17--remove_file $MYSQLTEST_VARDIR/tmp/m_i_db.out
18
19--perl
20$passwd="";
21open(PWDPATH, "$ENV{MYSQL_TMP_DIR}/readpwdfilepath.txt") or die("Could not open pwdpath file");
22my $filename = <PWDPATH>;
23chomp $filename;
24if (-e $filename) {
25  open(PWDFILE, $filename) or die("Could not open password file");
26  my @pass = <PWDFILE>;
27  chomp @pass;
28  $passwd=@pass[1];
29}
30open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/readpwd.inc") or die $!;
31print FILE "delimiter lessprobability;\n";
32print FILE "let passwd=$passwd";
33print FILE "lessprobability\n";
34print FILE "--delimiter ;\n";
35close FILE;
36EOF
37--source $MYSQL_TMP_DIR/readpwd.inc
38