~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

Viewing changes to mysql-test/t/bootstrap.test

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# test mysqld in bootstrap mode
 
3
#
 
4
--disable_warnings
 
5
drop table if exists t1;
 
6
--enable_warnings
 
7
 
 
8
 
 
9
#
 
10
# Check that --bootstrap reads from stdin
 
11
#
 
12
--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql
 
13
use test;
 
14
CREATE TABLE t1(a int);
 
15
EOF
 
16
--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
 
17
drop table t1;
 
18
remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql;
 
19
 
 
20
#
 
21
# Check that --bootstrap of file with SQL error returns error
 
22
#
 
23
--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql
 
24
use test;
 
25
CREATE TABLE t1;
 
26
EOF
 
27
--error 1
 
28
--exec $MYSQLD_BOOTSTRAP_CMD  < $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
 
29
# Table t1 should not exists
 
30
--error 1051
 
31
drop table t1;
 
32
remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql;
 
33
 
 
34
#
 
35
# Bootstrap with a query larger than 2*thd->net.max_packet
 
36
#
 
37
set @my_max_allowed_packet= @@max_allowed_packet;
 
38
set global max_allowed_packet=100*@@max_allowed_packet;
 
39
--disable_query_log
 
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;
 
42
--enable_query_log
 
43
--error 1
 
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;
 
46
 
 
47
set global max_allowed_packet=@my_max_allowed_packet;
 
48
drop table t1;
 
49