1
drop table if exists t1, t2;
3
create table t1 (a int);
4
create table t1 (a int);
5
ERROR 42S01: Table 'test.t1' already exists
11
Error 1050 Table 'test.t1' already exists
14
Error 1050 Table 'test.t1' already exists
16
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near ')' at line 1
22
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near ')' at line 1
23
insert into t1 values (1);
24
insert into t1 values ("hej");
25
ERROR HY000: Incorrect integer value: 'hej' for column 'a' at row 1
26
insert into t1 values ("hej"),("d�");
27
ERROR HY000: Incorrect integer value: 'hej' for column 'a' at row 1
29
insert into t1 values ("hej");
30
ERROR HY000: Incorrect integer value: 'hej' for column 'a' at row 1
31
insert into t1 values ("hej"),("d�");
32
ERROR HY000: Incorrect integer value: 'hej' for column 'a' at row 1
35
drop temporary table if exists not_exists;
37
Note 1051 Unknown table 'not_exists'
38
drop table if exists not_exists_table;
40
Note 1051 Unknown table 'not_exists_table'
41
show warnings limit 1;
43
Note 1051 Unknown table 'not_exists_table'
44
drop database if exists not_exists_db;
46
Note 1008 Can't drop schema 'not_exists_db'; schema doesn't exist
47
show count(*) warnings;
48
@@session.warning_count
50
create table t1(id int);
51
create table if not exists t1(id int);
53
Note 1050 Table 't1' already exists
54
select @@warning_count;
58
create table t1(a int, b int not null, c date, d char(5));
59
load data infile 'DRIZZLETEST_VARDIR/std_data_ln/warnings_loaddata.dat' into table t1 fields terminated by ',';
60
ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
61
select @@warning_count;
65
create table t1(a int NOT NULL, b int, c char(5));
66
insert into t1 values(-1,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test');
67
ERROR 22001: Data too long for column 'c' at row 2
68
insert into t1 values(-1,100,'mysql'),(10,-1,'dri '),(500,256,'zzle'),(20,NULL,'test');
69
alter table t1 modify c char(4);
70
ERROR 01000: Data truncated for column 'c' at row 1
71
alter table t1 add d char(2);
72
update t1 set a=NULL where a=10;
73
ERROR 23000: Column 'a' cannot be null
74
update t1 set c='drizzle' where c='test';
75
ERROR 22001: Data too long for column 'c' at row 4
77
ERROR 22001: Data too long for column 'd' at row 1
78
create table t2(a int NOT NULL, b char(3));
79
insert into t2 select b,c from t1;
80
ERROR 22001: Data too long for column 'b' at row 1
81
insert into t2(b) values('mysqlab');
82
ERROR HY000: Field 'a' doesn't have a default value
83
insert into t2(a) values(1);
85
insert into t2(a,b) values(1,'mysqlab');
86
ERROR 22001: Data too long for column 'b' at row 1
87
insert into t2(a,b) values(1,'mys');
90
create table t1(a char(10));
91
alter table t1 add b char;
92
set max_error_count=10;
94
ERROR 22001: Data too long for column 'b' at row 1
95
alter table t1 modify b char(10);
97
select @@warning_count;
100
set max_error_count=0;
101
show variables like 'max_error_count';
104
update t1 set b='hi';
105
select @@warning_count;
110
set max_error_count=65535;
111
show variables like 'max_error_count';
113
max_error_count 65535
114
set max_error_count=10;
115
show variables like 'max_error_count';
119
create table t1 (a int);
120
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
121
update t1 set a='abc';
122
ERROR HY000: Incorrect integer value: 'abc' for column 'a' at row 1
123
show warnings limit 2, 1;
125
show warnings limit 0, 10;
127
Error 1366 Incorrect integer value: 'abc' for column 'a' at row 1
128
show warnings limit 9, 1;
130
show warnings limit 10, 1;
132
show warnings limit 9, 2;
134
show warnings limit 0, 0;
136
show warnings limit 1;
138
Error 1366 Incorrect integer value: 'abc' for column 'a' at row 1
139
show warnings limit 0;
141
show warnings limit 1, 0;
143
select * from t1 limit 0;
145
select * from t1 limit 1, 0;
147
select * from t1 limit 0, 0;
151
create table t1 (c_char char(255), c_varchar varchar(255), c_tinytext blob);
152
set @c = repeat(' ', 256);
153
set @q = repeat('q', 256);
154
insert into t1 values(@c, @c, @c);
155
ERROR 22001: Data too long for column 'c_char' at row 1
158
Error 1406 Data too long for column 'c_char' at row 1
159
insert into t1 values(@q, NULL, NULL);
160
ERROR 22001: Data too long for column 'c_char' at row 1
161
insert into t1 values(NULL, @q, NULL);
162
ERROR 22001: Data too long for column 'c_varchar' at row 1
163
insert into t1 values(NULL, NULL, @q);