1
1
DROP TABLE IF EXISTS t1;
2
CREATE TABLE t1 (sint8 int not null);
2
CREATE TABLE t1 (sint8 tinyint not null);
3
3
INSERT INTO t1 VALUES ('0.1');
4
4
INSERT INTO t1 VALUES ('0.5');
5
5
INSERT INTO t1 VALUES ('127.4');
6
6
INSERT INTO t1 VALUES ('127.5');
8
Warning 1264 Out of range value for column 'sint8' at row 1
7
9
INSERT INTO t1 VALUES ('-0.1');
8
10
INSERT INTO t1 VALUES ('-0.5');
9
11
INSERT INTO t1 VALUES ('-127.4');
10
12
INSERT INTO t1 VALUES ('-127.5');
11
13
INSERT INTO t1 VALUES ('-128.4');
12
14
INSERT INTO t1 VALUES ('-128.5');
16
Warning 1264 Out of range value for column 'sint8' at row 1
26
CREATE TABLE t1 (uint8 int not null);
30
CREATE TABLE t1 (uint8 tinyint unsigned not null);
27
31
INSERT INTO t1 VALUES ('0.1');
28
32
INSERT INTO t1 VALUES ('0.5');
29
33
INSERT INTO t1 VALUES ('127.4');
30
34
INSERT INTO t1 VALUES ('127.5');
31
35
INSERT INTO t1 VALUES ('-0.1');
32
36
INSERT INTO t1 VALUES ('-0.5');
38
Warning 1264 Out of range value for column 'uint8' at row 1
33
39
INSERT INTO t1 VALUES ('255.4');
34
40
INSERT INTO t1 VALUES ('255.5');
42
Warning 1264 Out of range value for column 'uint8' at row 1
46
CREATE TABLE t1 (sint16 int not null);
54
CREATE TABLE t1 (sint16 smallint not null);
47
55
INSERT INTO t1 VALUES ('0.1');
48
56
INSERT INTO t1 VALUES ('0.5');
49
57
INSERT INTO t1 VALUES ('32767.4');
50
58
INSERT INTO t1 VALUES ('32767.5');
60
Warning 1264 Out of range value for column 'sint16' at row 1
51
61
INSERT INTO t1 VALUES ('-0.1');
52
62
INSERT INTO t1 VALUES ('-0.5');
53
63
INSERT INTO t1 VALUES ('-32767.4');
54
64
INSERT INTO t1 VALUES ('-32767.5');
55
65
INSERT INTO t1 VALUES ('-32768.4');
56
66
INSERT INTO t1 VALUES ('-32768.5');
68
Warning 1264 Out of range value for column 'sint16' at row 1
70
CREATE TABLE t1 (uint16 int not null);
82
CREATE TABLE t1 (uint16 smallint unsigned not null);
71
83
INSERT INTO t1 VALUES ('0.1');
72
84
INSERT INTO t1 VALUES ('0.5');
73
85
INSERT INTO t1 VALUES ('32767.4');
74
86
INSERT INTO t1 VALUES ('32767.5');
75
87
INSERT INTO t1 VALUES ('-0.1');
76
88
INSERT INTO t1 VALUES ('-0.5');
90
Warning 1264 Out of range value for column 'uint16' at row 1
77
91
INSERT INTO t1 VALUES ('65535.4');
78
92
INSERT INTO t1 VALUES ('65535.5');
94
Warning 1264 Out of range value for column 'uint16' at row 1
90
CREATE TABLE t1 (sint24 int not null);
106
CREATE TABLE t1 (sint24 mediumint not null);
91
107
INSERT INTO t1 VALUES ('0.1');
92
108
INSERT INTO t1 VALUES ('0.5');
93
109
INSERT INTO t1 VALUES ('8388607.4');
94
110
INSERT INTO t1 VALUES ('8388607.5');
112
Warning 1264 Out of range value for column 'sint24' at row 1
95
113
INSERT INTO t1 VALUES ('-0.1');
96
114
INSERT INTO t1 VALUES ('-0.5');
97
115
INSERT INTO t1 VALUES ('-8388607.4');
98
116
INSERT INTO t1 VALUES ('-8388607.5');
99
117
INSERT INTO t1 VALUES ('-8388608.4');
100
118
INSERT INTO t1 VALUES ('-8388608.5');
120
Warning 1264 Out of range value for column 'sint24' at row 1
101
121
SELECT * FROM t1;
114
CREATE TABLE t1 (uint24 int not null);
134
CREATE TABLE t1 (uint24 mediumint unsigned not null);
115
135
INSERT INTO t1 VALUES ('0.1');
116
136
INSERT INTO t1 VALUES ('0.5');
117
137
INSERT INTO t1 VALUES ('8388607.4');
118
138
INSERT INTO t1 VALUES ('8388607.5');
119
139
INSERT INTO t1 VALUES ('-0.1');
120
140
INSERT INTO t1 VALUES ('-0.5');
142
Warning 1264 Out of range value for column 'uint24' at row 1
121
143
INSERT INTO t1 VALUES ('16777215.4');
122
144
INSERT INTO t1 VALUES ('16777215.5');
146
Warning 1264 Out of range value for column 'uint24' at row 1
123
147
SELECT * FROM t1;
134
158
CREATE TABLE t1 (sint64 bigint not null);
135
159
INSERT INTO t1 VALUES ('0.1');
136
160
INSERT INTO t1 VALUES ('0.5');
137
161
INSERT INTO t1 VALUES ('9223372036854775807.4');
138
INSERT INTO t1 VALUES ('9223372036854775806.5');
162
INSERT INTO t1 VALUES ('9223372036854775807.5');
164
Warning 1264 Out of range value for column 'sint64' at row 1
139
165
INSERT INTO t1 VALUES ('-0.1');
140
166
INSERT INTO t1 VALUES ('-0.5');
141
167
INSERT INTO t1 VALUES ('-9223372036854775807.4');
142
168
INSERT INTO t1 VALUES ('-9223372036854775807.5');
143
169
INSERT INTO t1 VALUES ('-9223372036854775808.4');
144
INSERT INTO t1 VALUES ('-9223372036854775802.5');
170
INSERT INTO t1 VALUES ('-9223372036854775808.5');
172
Warning 1264 Out of range value for column 'sint64' at row 1
145
173
SELECT * FROM t1;
153
181
-9223372036854775807
154
182
-9223372036854775808
155
183
-9223372036854775808
158
CREATE TABLE t1 (uint64 bigint not null);
186
CREATE TABLE t1 (uint64 bigint unsigned not null);
159
187
INSERT INTO t1 VALUES ('0.1');
160
188
INSERT INTO t1 VALUES ('0.5');
161
189
INSERT INTO t1 VALUES ('9223372036854775807.4');
162
190
INSERT INTO t1 VALUES ('9223372036854775807.5');
163
ERROR 22003: Out of range value for column 'uint64' at row 1
164
191
INSERT INTO t1 VALUES ('-0.1');
165
192
INSERT INTO t1 VALUES ('-0.5');
194
Warning 1264 Out of range value for column 'uint64' at row 1
166
195
INSERT INTO t1 VALUES ('18446744073709551615.4');
167
ERROR 22003: Out of range value for column 'uint64' at row 1
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');
168
217
SELECT * FROM t1;
172
221
9223372036854775807
176
246
CREATE TABLE t1 (str varchar(128), sint64 bigint not null default 0);
177
247
INSERT INTO t1 (str) VALUES ('1.5');