~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/haildb/tests/r/truncate.result

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
drop table if exists t1;
2
 
create table t1 (a integer, b integer,c1 CHAR(10), primary key (a,b));
3
 
insert into t1 (a,b) values (1,3),(2,3);
4
 
truncate table t1;
5
 
select count(*) from t1;
6
 
count(*)
7
 
0
8
 
insert into t1 values(1,2,"test");
9
 
select count(*) from t1;
10
 
count(*)
11
 
1
12
 
delete from t1;
13
 
select * from t1;
14
 
a       b       c1
15
 
drop table t1;
16
 
select count(*) from t1;
17
 
ERROR 42S02: Unknown table 'test.t1'
18
 
create table t1 (n int primary key);
19
 
insert into t1 values (1),(2),(3);
20
 
truncate table t1;
21
 
select * from t1;
22
 
n
23
 
drop table t1;
24
 
truncate non_existing_table;
25
 
ERROR 42S02: Unknown table 'test.non_existing_table'
26
 
create table t1 (a integer auto_increment primary key);
27
 
insert into t1 (a) values (NULL),(NULL);
28
 
truncate table t1;
29
 
insert into t1 (a) values (NULL),(NULL);
30
 
SELECT * from t1;
31
 
a
32
 
1
33
 
2
34
 
delete from t1;
35
 
insert into t1 (a) values (NULL),(NULL);
36
 
SELECT * from t1;
37
 
a
38
 
3
39
 
4
40
 
drop table t1;
41
 
create table t1 (a integer auto_increment primary key);
42
 
insert into t1 (a) values (NULL),(NULL);
43
 
truncate table t1;
44
 
insert into t1 (a) values (NULL),(NULL);
45
 
SELECT * from t1;
46
 
a
47
 
1
48
 
2
49
 
delete from t1;
50
 
insert into t1 (a) values (NULL),(NULL);
51
 
SELECT * from t1;
52
 
a
53
 
3
54
 
4
55
 
drop table t1;