summaryrefslogtreecommitdiff
path: root/mysql-test/t/client_xml.test
blob: 739b56f5ab1912161cd4f67ab8c7bbd26b706255 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Can't run with embedded server
-- source include/not_embedded.inc

# Disable concurrent inserts to avoid test failures when reading
# data from concurrent connections (insert might return before
# the data is actually in the table).
set @old_concurrent_insert= @@global.concurrent_insert;
set @@global.concurrent_insert= 0;
--disable_warnings
drop table if exists t1;
--enable_warnings

# Test of the xml output of the 'mysql' and 'mysqldump' clients -- makes
# sure that basic encoding issues are handled properly
create table t1 (
  `a&b` int,
  `a<b` int,
  `a>b` text
);
insert into t1 values (1, 2, 'a&b a<b a>b');
--exec $MYSQL --xml test -e "select * from t1"
--exec $MYSQL_DUMP --xml --skip-create test

--exec $MYSQL --xml test -e "select count(*) from t1"
--exec $MYSQL --xml test -e "select 1 < 2 from dual"
--exec $MYSQL --xml test -e "select 1 > 2 from dual"
--exec $MYSQL --xml test -e "select 1 & 3 from dual"
--exec $MYSQL --xml test -e "select null from dual"
--exec $MYSQL --xml test -e "select 1 limit 0"
--exec $MYSQL --xml test -vv -e "select 1 limit 0"

drop table t1;

# Restore global concurrent_insert value
set @@global.concurrent_insert= @old_concurrent_insert;