2
# test mysqld in bootstrap mode
5
drop table if exists t1;
10
# Check that --bootstrap reads from stdin
12
--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql
14
CREATE TABLE t1(a int);
16
--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
18
remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql;
21
# Check that --bootstrap of file with SQL error returns error
23
--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql
28
--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
29
# Table t1 should not exists
32
remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql;
35
# Bootstrap with a query larger than 2*thd->net.max_packet
37
set @my_max_allowed_packet= @@max_allowed_packet;
38
set global max_allowed_packet=100*@@max_allowed_packet;
40
create table t1 select 2 as a, concat(repeat('MySQL', @@max_allowed_packet/10), ';') as b;
41
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/long_query.sql' from t1;
44
--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/long_query.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
45
remove_file $MYSQLTEST_VARDIR/tmp/long_query.sql;
47
set global max_allowed_packet=@my_max_allowed_packet;