~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/r/round.result

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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');
 
7
Warnings:
 
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');
 
15
Warnings:
 
16
Warning 1264    Out of range value for column 'sint8' at row 1
 
17
SELECT * FROM t1;
 
18
sint8
 
19
0
 
20
1
 
21
127
 
22
127
 
23
0
 
24
-1
 
25
-127
 
26
-128
 
27
-128
 
28
-128
 
29
DROP TABLE t1;
 
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');
 
37
Warnings:
 
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');
 
41
Warnings:
 
42
Warning 1264    Out of range value for column 'uint8' at row 1
 
43
SELECT * FROM t1;
 
44
uint8
 
45
0
 
46
1
 
47
127
 
48
128
 
49
0
 
50
0
 
51
255
 
52
255
 
53
DROP TABLE t1;
 
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');
 
59
Warnings:
 
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');
 
67
Warnings:
 
68
Warning 1264    Out of range value for column 'sint16' at row 1
 
69
SELECT * FROM t1;
 
70
sint16
 
71
0
 
72
1
 
73
32767
 
74
32767
 
75
0
 
76
-1
 
77
-32767
 
78
-32768
 
79
-32768
 
80
-32768
 
81
DROP TABLE t1;
 
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');
 
89
Warnings:
 
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');
 
93
Warnings:
 
94
Warning 1264    Out of range value for column 'uint16' at row 1
 
95
SELECT * FROM t1;
 
96
uint16
 
97
0
 
98
1
 
99
32767
 
100
32768
 
101
0
 
102
0
 
103
65535
 
104
65535
 
105
DROP TABLE t1;
 
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');
 
111
Warnings:
 
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');
 
119
Warnings:
 
120
Warning 1264    Out of range value for column 'sint24' at row 1
 
121
SELECT * FROM t1;
 
122
sint24
 
123
0
 
124
1
 
125
8388607
 
126
8388607
 
127
0
 
128
-1
 
129
-8388607
 
130
-8388608
 
131
-8388608
 
132
-8388608
 
133
DROP TABLE t1;
 
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');
 
141
Warnings:
 
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');
 
145
Warnings:
 
146
Warning 1264    Out of range value for column 'uint24' at row 1
 
147
SELECT * FROM t1;
 
148
uint24
 
149
0
 
150
1
 
151
8388607
 
152
8388608
 
153
0
 
154
0
 
155
16777215
 
156
16777215
 
157
DROP TABLE t1;
 
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');
 
163
Warnings:
 
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');
 
171
Warnings:
 
172
Warning 1264    Out of range value for column 'sint64' at row 1
 
173
SELECT * FROM t1;
 
174
sint64
 
175
0
 
176
1
 
177
9223372036854775807
 
178
9223372036854775807
 
179
0
 
180
-1
 
181
-9223372036854775807
 
182
-9223372036854775808
 
183
-9223372036854775808
 
184
-9223372036854775808
 
185
DROP TABLE t1;
 
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');
 
193
Warnings:
 
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');
 
197
Warnings:
 
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');
 
217
SELECT * FROM t1;
 
218
uint64
 
219
0
 
220
1
 
221
9223372036854775807
 
222
9223372036854775808
 
223
0
 
224
0
 
225
18446744073709551615
 
226
18446744073709551615
 
227
1844674407370955161
 
228
1844674407370955161
 
229
1844674407370955161
 
230
1844674407370955161
 
231
1844674407370955161
 
232
1844674407370955162
 
233
18446744073709551610
 
234
18446744073709551611
 
235
18446744073709551612
 
236
18446744073709551613
 
237
18446744073709551614
 
238
18446744073709551615
 
239
1844674407370955161
 
240
1844674407370955161
 
241
1844674407370955161
 
242
1844674407370955161
 
243
1844674407370955161
 
244
1844674407370955162
 
245
DROP TABLE t1;
 
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;
 
259
SELECT * FROM t1;
 
260
str     sint64
 
261
1.5     2
 
262
1.00005e4       10001
 
263
1.0005e3        1001
 
264
1.005e2 101
 
265
1.05e1  11
 
266
1.5e0   2
 
267
100005e-1       10001
 
268
100050e-2       1001
 
269
100500e-3       101
 
270
105000e-4       11
 
271
150000e-5       2
 
272
DROP TABLE t1;