5
drop table if exists t1;
8
create table t1 (a integer, b integer,c1 CHAR(10));
9
insert into t1 (a) values (1),(2);
11
select count(*) from t1;
12
insert into t1 values(1,2,"test");
13
select count(*) from t1;
17
# The following should fail
19
select count(*) from t1;
20
create temporary table t1 (n int);
21
insert into t1 values (1),(2),(3);
26
truncate non_existing_table;
29
# test autoincrement with TRUNCATE; verifying difference with DELETE
32
create table t1 (a integer auto_increment primary key);
33
insert into t1 (a) values (NULL),(NULL);
35
insert into t1 (a) values (NULL),(NULL);
38
insert into t1 (a) values (NULL),(NULL);
42
# Verifying that temp tables are handled the same way
44
create temporary table t1 (a integer auto_increment primary key);
45
insert into t1 (a) values (NULL),(NULL);
47
insert into t1 (a) values (NULL),(NULL);
50
insert into t1 (a) values (NULL),(NULL);
56
# Test for Bug#5507 "TRUNCATE should work with views"
58
# when it'll be fixed, the error should become 1347
59
# (test.v1' is not BASE TABLE)
62
create table t1 (s1 int);
63
insert into t1 (s1) values (1), (2), (3), (4), (5);
64
create view v1 as select * from t1;