~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

Viewing changes to mysql-test/r/truncate.result

  • 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
drop table if exists t1;
 
2
create table t1 (a integer, b integer,c1 CHAR(10));
 
3
insert into t1 (a) values (1),(2);
 
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: Table 'test.t1' doesn't exist
 
18
create temporary table t1 (n int);
 
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: Table 'test.non_existing_table' doesn't exist
 
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 temporary 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;
 
56
create table t1 (s1 int);
 
57
insert into t1 (s1) values (1), (2), (3), (4), (5);
 
58
create view v1 as select * from t1;
 
59
truncate table v1;
 
60
ERROR 42S02: Table 'test.v1' doesn't exist
 
61
drop view v1;
 
62
drop table t1;