~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Can't run with embedded server
 
2
-- source include/not_embedded.inc
 
3
 
 
4
# Disable concurrent inserts to avoid test failures when reading
 
5
# data from concurrent connections (insert might return before
 
6
# the data is actually in the table).
 
7
set @old_concurrent_insert= @@global.concurrent_insert;
 
8
set @@global.concurrent_insert= 0;
 
9
--disable_warnings
 
10
drop table if exists t1;
 
11
--enable_warnings
 
12
 
 
13
# Test of the xml output of the 'mysql' and 'mysqldump' clients -- makes
 
14
# sure that basic encoding issues are handled properly
 
15
create table t1 (
 
16
  `a&b` int,
 
17
  `a<b` int,
 
18
  `a>b` text
 
19
);
 
20
insert into t1 values (1, 2, 'a&b a<b a>b');
 
21
 
 
22
# Determine the number of open sessions
 
23
--source include/count_sessions.inc
 
24
 
 
25
--exec $MYSQL --xml test -e "select * from t1"
 
26
--exec $MYSQL_DUMP --xml --skip-create test
 
27
 
 
28
--exec $MYSQL --xml test -e "select count(*) from t1"
 
29
--exec $MYSQL --xml test -e "select 1 < 2 from dual"
 
30
--exec $MYSQL --xml test -e "select 1 > 2 from dual"
 
31
--exec $MYSQL --xml test -e "select 1 & 3 from dual"
 
32
--exec $MYSQL --xml test -e "select null from dual"
 
33
--exec $MYSQL --xml test -e "select 1 limit 0"
 
34
--exec $MYSQL --xml test -vv -e "select 1 limit 0"
 
35
 
 
36
drop table t1;
 
37
 
 
38
# Restore global concurrent_insert value
 
39
set @@global.concurrent_insert= @old_concurrent_insert;
 
40
 
 
41
# Wait till the number of open sessions is <= the number before the runs with
 
42
# $MYSQL and $MYSQL_DUMP
 
43
# = The session caused by mysql and mysqldump have finished their disconnect
 
44
--source include/wait_until_count_sessions.inc