~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/loadxml.test

  • Committer: Brian Aker
  • Date: 2008-09-05 23:02:34 UTC
  • mfrom: (379 codestyle)
  • mto: This revision was merged to the branch mainline in revision 383.
  • Revision ID: brian@tangent.org-20080905230234-tq426zr79cnzjwo3
Merge from Monty, cleanup in tabs during merg.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Tests for "LOAD XML" - a contributed patch from Erik Wetterberg.
 
3
#
 
4
 
 
5
--disable_warnings
 
6
drop table if exists t1;
 
7
--enable_warnings
 
8
 
 
9
create table t1 (a int, b varchar(64));
 
10
 
 
11
 
 
12
--echo -- Load a static XML file
 
13
load xml infile '../std_data_ln/loadxml.dat' into table t1
 
14
rows identified by '<row>';
 
15
select * from t1 order by a;
 
16
delete from t1;
 
17
 
 
18
 
 
19
--echo -- Load a static XML file with 'IGNORE num ROWS'
 
20
load xml infile '../std_data_ln/loadxml.dat' into table t1
 
21
rows identified by '<row>' ignore 4 rows;
 
22
select * from t1 order by a;
 
23
 
 
24
 
 
25
--echo -- Check 'mysqldump --xml' + 'LOAD XML' round trip
 
26
--exec $DRIZZLE_DUMP --xml test t1 > "$MYSQLTEST_VARDIR/loadxml-dump.xml" 2>&1
 
27
delete from t1;
 
28
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 
29
--eval load xml infile '$MYSQLTEST_VARDIR/loadxml-dump.xml' into table t1 rows identified by '<row>';
 
30
select * from t1 order by a;
 
31
 
 
32
--echo --Check that default row tag is '<row>
 
33
delete from t1;
 
34
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 
35
--eval load xml infile '$MYSQLTEST_VARDIR/loadxml-dump.xml' into table t1;
 
36
select * from t1 order by a;
 
37
 
 
38
--echo -- Check that 'xml' is not a keyword
 
39
select 1 as xml;
 
40
 
 
41
 
 
42
#
 
43
# Clean up
 
44
#
 
45
--system rm $MYSQLTEST_VARDIR/loadxml-dump.xml
 
46
drop table t1;
 
47