~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/drizzledump_restore.test

  • Committer: Mark Atwood
  • Date: 2010-06-24 03:15:21 UTC
  • mto: (1637.2.4 build)
  • mto: This revision was merged to the branch mainline in revision 1639.
  • Revision ID: me@mark.atwood.name-20100624031521-gafmppfbf5afm68w
new syslog module, with plugins for query log, error message, and SYSLOG() function

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
# Define drizzledumpfile here.  It is used to capture drizzledump output
28
28
# in order to test the output's ability to restore an exact copy of the table
29
 
let $drizzledumpfile = $DRIZZLETEST_VARDIR/tmp/drizzledumpfile.sql;
 
29
let $drizzledumpfile = $MYSQLTEST_VARDIR/tmp/drizzledumpfile.sql;
30
30
 
31
31
--echo # Pre-test cleanup
32
32
--disable_warnings
79
79
--echo #
80
80
CREATE TABLE t1 (`b` blob);
81
81
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
82
 
--exec $DRIZZLE_DUMP --skip-extended-insert test --skip-comments t1 > $drizzledumpfile
 
82
--exec $DRIZZLE_DUMP --skip-extended-insert --hex-blob test --skip-comments t1 > $drizzledumpfile
83
83
let $table_name = test.t1;
84
84
--source include/drizzledump.inc
85
85
 
86
 
--echo #
87
 
--echo # Bug#550091 in Drizzle: "drizzledump dumps data_dictionary"
88
 
--echo #
89
 
# We create a table in the test database
90
 
# We create an additional database and create a table there
91
 
# We dump all, then attempt to recreate and do some basic queries against
92
 
# our previously created tables
93
 
#
94
 
# We don't explicitly check the dumpfile for data_dictionary or
95
 
# information_schema output, but this test was failing on
96
 
# the unpatched drizzledump during dumping of data_dictionary
97
 
# information
98
 
 
99
 
 
100
 
CREATE TABLE t1 (a char(100), b int);
101
 
INSERT INTO t1 values ('a',100);
102
 
INSERT INTO t1 values ('b',200);
103
 
 
104
 
CREATE SCHEMA drizzledump_test;
105
 
USE drizzledump_test;
106
 
CREATE TABLE t1 (a int, b char(100));
107
 
INSERT INTO t1 VALUES (1, 'abbazabba');
108
 
 
109
 
# dump all databases here
110
 
--exec $DRIZZLE_DUMP --skip-comments --compact -A > $drizzledumpfile
111
 
 
112
 
--echo DROP original schemas
113
 
DROP DATABASE test;
114
 
DROP DATABASE drizzledump_test;
115
 
 
116
 
--echo Ensure we don't have those tables (verify we restored something)
117
 
--ERROR ER_TABLE_UNKNOWN
118
 
SELECT * FROM test.t1;
119
 
--ERROR ER_TABLE_UNKNOWN
120
 
SELECT * FROM drizzledump_test.t1;
121
 
 
122
 
--echo Restoring from dumpfile
123
 
--exec $DRIZZLE < $drizzledumpfile
124
 
 
125
 
USE test;
126
 
SELECT * FROM t1;
127
 
SELECT * FROM drizzledump_test.t1;
128
 
--echo Cleanup
129
 
DROP DATABASE drizzledump_test;
130
 
DROP TABLE t1;
131
 
 
132
86
--echo # End tests
133
87
 
134
88
--echo # Cleanup
135
89
--echo # remove drizzledumpfile
136
 
--error EE_OK,EE_ERROR_FIRST
 
90
--error 0,1
137
91
--remove_file $drizzledumpfile