~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

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