~jan-kneschke/mysql-proxy/packet-tracking-assertions

« back to all changes in this revision

Viewing changes to tags/mysql-proxy-0.6.1/tests/suite/base/t/xtab2.test

  • Committer: Kay Roepke
  • Author(s): Jan Kneschke
  • Date: 2008-01-23 22:00:28 UTC
  • Revision ID: kay@mysql.com-20080123220028-hq2xqb69apa75fnx
first round on mysql-shell based on the proxy code

this is mostly a verification if the proxy-code is flexible enough to handle 
all three scenarios of: client, server and forwarding (proxy)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--disable_warnings
 
2
drop table if exists t1;
 
3
--enable_warnings
 
4
 
 
5
CREATE TABLE t1 (
 
6
  person_id int(10) unsigned NOT NULL default '0',
 
7
  country char(30) NOT NULL default '',
 
8
  loc char(30) NOT NULL default '',
 
9
  department char(30) NOT NULL default '',
 
10
  category varchar(4) NOT NULL default '',
 
11
  name char(20) NOT NULL default '',
 
12
  salary int(11) NOT NULL default 0,
 
13
  gender char(1) NOT NULL default 'f',
 
14
  primary key (person_id)
 
15
);
 
16
 
 
17
INSERT INTO t1 
 
18
  (person_id, country, loc, department, category, name, salary, gender) 
 
19
VALUES 
 
20
  (1,'UK','London','pers','cont','John',5000,'m'),
 
21
  (2,'Italy','Rome','pers','empl','Mario',6000,'m'),
 
22
  (3,'Germany','Bonn','sales','empl','Frank',5000,'m'),
 
23
  (4,'Germany','Berlin','dev','empl','Otto',6000,'m'),
 
24
  (5,'Germany','Munich','sales','cons','Susan',5500,'f'),
 
25
  (6,'UK','London','sales','cont','Martin',5500,'m'),
 
26
  (7,'Germany','Berlin','pers','empl','Mary',5500,'f'),
 
27
  (8,'Germany','Munich','pers','empl','Bill',5000,'m'),
 
28
  (9,'Italy','Rome','dev','cons','June',6000,'f');
 
29
 
 
30
xtab t1 country gender count salary;
 
31
xtab t1 country gender count salary summary;
 
32
xtab t1 country gender sum salary;
 
33
xtab t1 country gender sum salary summary;
 
34
 
 
35
xtab t1 gender country count salary;
 
36
xtab t1 gender country count salary summary;
 
37
xtab t1 gender country sum salary;
 
38
xtab t1 gender country sum salary summary;
 
39
 
 
40
xtab query;
 
41
xtab t1 gender country sum salary summary;
 
42
 
 
43
drop table t1;
 
44