~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/pbxt/warnings.result

  • Committer: Brian Aker
  • Date: 2009-02-10 00:14:40 UTC
  • Revision ID: brian@tangent.org-20090210001440-qjg8eofh3h93064b
Adding Multi-threaded Scheduler into the system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
drop table if exists t1, t2;
2
 
SET SQL_WARNINGS=1;
3
 
create table t1 (a int);
4
 
create table t1 (a int);
5
 
ERROR 42S01: Table 'test.t1' already exists
6
 
show count(*) errors;
7
 
@@session.error_count
8
 
1
9
 
show errors;
10
 
Level   Code    Message
11
 
Error   1050    Table 'test.t1' already exists
12
 
show warnings;
13
 
Level   Code    Message
14
 
Error   1050    Table 'test.t1' already exists
15
 
create table t (i);
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
17
 
show count(*) errors;
18
 
@@session.error_count
19
 
1
20
 
show errors;
21
 
Level   Code    Message
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
28
 
set SQL_WARNINGS=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
33
 
drop table t1;
34
 
set SQL_WARNINGS=0;
35
 
drop temporary table if exists not_exists;
36
 
Warnings:
37
 
Note    1051    Unknown table 'not_exists'
38
 
drop table if exists not_exists_table;
39
 
Warnings:
40
 
Note    1051    Unknown table 'not_exists_table'
41
 
show warnings limit 1;
42
 
Level   Code    Message
43
 
Note    1051    Unknown table 'not_exists_table'
44
 
drop database if exists not_exists_db;
45
 
Warnings:
46
 
Note    1008    Can't drop database 'not_exists_db'; database doesn't exist
47
 
show count(*) warnings;
48
 
@@session.warning_count
49
 
1
50
 
create table t1(id int);
51
 
create table if not exists t1(id int);
52
 
Warnings:
53
 
Note    1050    Table 't1' already exists
54
 
select @@warning_count;
55
 
@@warning_count
56
 
1
57
 
drop table t1;
58
 
create table t1(a int, b int not null, c date, d char(5));
59
 
load data infile '../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;
62
 
@@warning_count
63
 
2
64
 
drop table t1;
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
76
 
update t1 set d=c;
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);
84
 
set sql_warnings=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');
88
 
set sql_warnings=0;
89
 
drop table t1, t2;
90
 
create table t1(a char(10));
91
 
alter table t1 add b char;
92
 
set max_error_count=10;
93
 
update t1 set b=a;
94
 
ERROR 22001: Data too long for column 'b' at row 1
95
 
alter table t1 modify b char(10);
96
 
update t1 set b=a;
97
 
select @@warning_count;
98
 
@@warning_count
99
 
0
100
 
set max_error_count=0;
101
 
show variables like 'max_error_count';
102
 
Variable_name   Value
103
 
max_error_count 0
104
 
update t1 set b='hi';
105
 
select @@warning_count;
106
 
@@warning_count
107
 
0
108
 
show warnings;
109
 
Level   Code    Message
110
 
set max_error_count=65535;
111
 
show variables like 'max_error_count';
112
 
Variable_name   Value
113
 
max_error_count 65535
114
 
set max_error_count=10;
115
 
show variables like 'max_error_count';
116
 
Variable_name   Value
117
 
max_error_count 10
118
 
drop table t1;
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;
124
 
Level   Code    Message
125
 
show warnings limit 0, 10;
126
 
Level   Code    Message
127
 
Error   1366    Incorrect integer value: 'abc' for column 'a' at row 1
128
 
Warning 1196    Some non-transactional changed tables couldn't be rolled back
129
 
show warnings limit 9, 1;
130
 
Level   Code    Message
131
 
show warnings limit 10, 1;
132
 
Level   Code    Message
133
 
show warnings limit 9, 2;
134
 
Level   Code    Message
135
 
show warnings limit 0, 0;
136
 
Level   Code    Message
137
 
show warnings limit 1;
138
 
Level   Code    Message
139
 
Error   1366    Incorrect integer value: 'abc' for column 'a' at row 1
140
 
show warnings limit 0;
141
 
Level   Code    Message
142
 
show warnings limit 1, 0;
143
 
Level   Code    Message
144
 
select * from t1 limit 0;
145
 
a
146
 
select * from t1 limit 1, 0;
147
 
a
148
 
select * from t1 limit 0, 0;
149
 
a
150
 
drop table t1;
151
 
End of 4.1 tests
152
 
create table t1 (c_char char(255), c_varchar varchar(255), c_tinytext blob);
153
 
set @c = repeat(' ', 256);
154
 
set @q = repeat('q', 256);
155
 
insert into t1 values(@c, @c, @c);
156
 
ERROR 22001: Data too long for column 'c_char' at row 1
157
 
show warnings;
158
 
Level   Code    Message
159
 
Error   1406    Data too long for column 'c_char' at row 1
160
 
Warning 1196    Some non-transactional changed tables couldn't be rolled back
161
 
insert into t1 values(@q, NULL, NULL);
162
 
ERROR 22001: Data too long for column 'c_char' at row 1
163
 
insert into t1 values(NULL, @q, NULL);
164
 
ERROR 22001: Data too long for column 'c_varchar' at row 1
165
 
insert into t1 values(NULL, NULL, @q);
166
 
drop table t1;
167
 
End of Drizzle tests