1
DROP TABLE IF EXISTS t1;
2
CREATE TABLE t1 (sint8 tinyint not null);
3
INSERT INTO t1 VALUES ('0.1');
4
INSERT INTO t1 VALUES ('0.5');
5
INSERT INTO t1 VALUES ('127.4');
6
INSERT INTO t1 VALUES ('127.5');
8
Warning 1264 Out of range value for column 'sint8' at row 1
9
INSERT INTO t1 VALUES ('-0.1');
10
INSERT INTO t1 VALUES ('-0.5');
11
INSERT INTO t1 VALUES ('-127.4');
12
INSERT INTO t1 VALUES ('-127.5');
13
INSERT INTO t1 VALUES ('-128.4');
14
INSERT INTO t1 VALUES ('-128.5');
16
Warning 1264 Out of range value for column 'sint8' at row 1
30
CREATE TABLE t1 (uint8 tinyint unsigned not null);
31
INSERT INTO t1 VALUES ('0.1');
32
INSERT INTO t1 VALUES ('0.5');
33
INSERT INTO t1 VALUES ('127.4');
34
INSERT INTO t1 VALUES ('127.5');
35
INSERT INTO t1 VALUES ('-0.1');
36
INSERT INTO t1 VALUES ('-0.5');
38
Warning 1264 Out of range value for column 'uint8' at row 1
39
INSERT INTO t1 VALUES ('255.4');
40
INSERT INTO t1 VALUES ('255.5');
42
Warning 1264 Out of range value for column 'uint8' at row 1
54
CREATE TABLE t1 (sint16 smallint not null);
55
INSERT INTO t1 VALUES ('0.1');
56
INSERT INTO t1 VALUES ('0.5');
57
INSERT INTO t1 VALUES ('32767.4');
58
INSERT INTO t1 VALUES ('32767.5');
60
Warning 1264 Out of range value for column 'sint16' at row 1
61
INSERT INTO t1 VALUES ('-0.1');
62
INSERT INTO t1 VALUES ('-0.5');
63
INSERT INTO t1 VALUES ('-32767.4');
64
INSERT INTO t1 VALUES ('-32767.5');
65
INSERT INTO t1 VALUES ('-32768.4');
66
INSERT INTO t1 VALUES ('-32768.5');
68
Warning 1264 Out of range value for column 'sint16' at row 1
82
CREATE TABLE t1 (uint16 smallint unsigned not null);
83
INSERT INTO t1 VALUES ('0.1');
84
INSERT INTO t1 VALUES ('0.5');
85
INSERT INTO t1 VALUES ('32767.4');
86
INSERT INTO t1 VALUES ('32767.5');
87
INSERT INTO t1 VALUES ('-0.1');
88
INSERT INTO t1 VALUES ('-0.5');
90
Warning 1264 Out of range value for column 'uint16' at row 1
91
INSERT INTO t1 VALUES ('65535.4');
92
INSERT INTO t1 VALUES ('65535.5');
94
Warning 1264 Out of range value for column 'uint16' at row 1
106
CREATE TABLE t1 (sint24 mediumint not null);
107
INSERT INTO t1 VALUES ('0.1');
108
INSERT INTO t1 VALUES ('0.5');
109
INSERT INTO t1 VALUES ('8388607.4');
110
INSERT INTO t1 VALUES ('8388607.5');
112
Warning 1264 Out of range value for column 'sint24' at row 1
113
INSERT INTO t1 VALUES ('-0.1');
114
INSERT INTO t1 VALUES ('-0.5');
115
INSERT INTO t1 VALUES ('-8388607.4');
116
INSERT INTO t1 VALUES ('-8388607.5');
117
INSERT INTO t1 VALUES ('-8388608.4');
118
INSERT INTO t1 VALUES ('-8388608.5');
120
Warning 1264 Out of range value for column 'sint24' at row 1
134
CREATE TABLE t1 (uint24 mediumint unsigned not null);
135
INSERT INTO t1 VALUES ('0.1');
136
INSERT INTO t1 VALUES ('0.5');
137
INSERT INTO t1 VALUES ('8388607.4');
138
INSERT INTO t1 VALUES ('8388607.5');
139
INSERT INTO t1 VALUES ('-0.1');
140
INSERT INTO t1 VALUES ('-0.5');
142
Warning 1264 Out of range value for column 'uint24' at row 1
143
INSERT INTO t1 VALUES ('16777215.4');
144
INSERT INTO t1 VALUES ('16777215.5');
146
Warning 1264 Out of range value for column 'uint24' at row 1
158
CREATE TABLE t1 (sint64 bigint not null);
159
INSERT INTO t1 VALUES ('0.1');
160
INSERT INTO t1 VALUES ('0.5');
161
INSERT INTO t1 VALUES ('9223372036854775807.4');
162
INSERT INTO t1 VALUES ('9223372036854775807.5');
164
Warning 1264 Out of range value for column 'sint64' at row 1
165
INSERT INTO t1 VALUES ('-0.1');
166
INSERT INTO t1 VALUES ('-0.5');
167
INSERT INTO t1 VALUES ('-9223372036854775807.4');
168
INSERT INTO t1 VALUES ('-9223372036854775807.5');
169
INSERT INTO t1 VALUES ('-9223372036854775808.4');
170
INSERT INTO t1 VALUES ('-9223372036854775808.5');
172
Warning 1264 Out of range value for column 'sint64' at row 1
186
CREATE TABLE t1 (uint64 bigint unsigned not null);
187
INSERT INTO t1 VALUES ('0.1');
188
INSERT INTO t1 VALUES ('0.5');
189
INSERT INTO t1 VALUES ('9223372036854775807.4');
190
INSERT INTO t1 VALUES ('9223372036854775807.5');
191
INSERT INTO t1 VALUES ('-0.1');
192
INSERT INTO t1 VALUES ('-0.5');
194
Warning 1264 Out of range value for column 'uint64' at row 1
195
INSERT INTO t1 VALUES ('18446744073709551615.4');
196
INSERT INTO t1 VALUES ('18446744073709551615.5');
198
Warning 1264 Out of range value for column 'uint64' at row 1
199
INSERT INTO t1 VALUES ('1844674407370955161.0');
200
INSERT INTO t1 VALUES ('1844674407370955161.1');
201
INSERT INTO t1 VALUES ('1844674407370955161.2');
202
INSERT INTO t1 VALUES ('1844674407370955161.3');
203
INSERT INTO t1 VALUES ('1844674407370955161.4');
204
INSERT INTO t1 VALUES ('1844674407370955161.5');
205
INSERT INTO t1 VALUES ('1844674407370955161.0e1');
206
INSERT INTO t1 VALUES ('1844674407370955161.1e1');
207
INSERT INTO t1 VALUES ('1844674407370955161.2e1');
208
INSERT INTO t1 VALUES ('1844674407370955161.3e1');
209
INSERT INTO t1 VALUES ('1844674407370955161.4e1');
210
INSERT INTO t1 VALUES ('1844674407370955161.5e1');
211
INSERT INTO t1 VALUES ('18446744073709551610e-1');
212
INSERT INTO t1 VALUES ('18446744073709551611e-1');
213
INSERT INTO t1 VALUES ('18446744073709551612e-1');
214
INSERT INTO t1 VALUES ('18446744073709551613e-1');
215
INSERT INTO t1 VALUES ('18446744073709551614e-1');
216
INSERT INTO t1 VALUES ('18446744073709551615e-1');
246
CREATE TABLE t1 (str varchar(128), sint64 bigint not null default 0);
247
INSERT INTO t1 (str) VALUES ('1.5');
248
INSERT INTO t1 (str) VALUES ('1.00005e4');
249
INSERT INTO t1 (str) VALUES ('1.0005e3');
250
INSERT INTO t1 (str) VALUES ('1.005e2');
251
INSERT INTO t1 (str) VALUES ('1.05e1');
252
INSERT INTO t1 (str) VALUES ('1.5e0');
253
INSERT INTO t1 (str) VALUES ('100005e-1');
254
INSERT INTO t1 (str) VALUES ('100050e-2');
255
INSERT INTO t1 (str) VALUES ('100500e-3');
256
INSERT INTO t1 (str) VALUES ('105000e-4');
257
INSERT INTO t1 (str) VALUES ('150000e-5');
258
UPDATE t1 SET sint64=str;