~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/round.result

  • Committer: Brian Aker
  • Date: 2008-10-18 22:47:08 UTC
  • mto: (492.3.21 drizzle-clean-code)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: brian@tangent.org-20081018224708-m6339ug8f2k4ajf1
Adding back more tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
DROP TABLE IF EXISTS t1;
2
 
CREATE TABLE t1 (sint8 tinyint not null);
 
2
CREATE TABLE t1 (sint8 int 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');
7
 
Warnings:
8
 
Warning 1264    Out of range value for column 'sint8' at row 1
9
7
INSERT INTO t1 VALUES ('-0.1');
10
8
INSERT INTO t1 VALUES ('-0.5');
11
9
INSERT INTO t1 VALUES ('-127.4');
12
10
INSERT INTO t1 VALUES ('-127.5');
13
11
INSERT INTO t1 VALUES ('-128.4');
14
12
INSERT INTO t1 VALUES ('-128.5');
15
 
Warnings:
16
 
Warning 1264    Out of range value for column 'sint8' at row 1
17
13
SELECT * FROM t1;
18
14
sint8
19
15
0
20
16
1
21
17
127
22
 
127
 
18
128
23
19
0
24
20
-1
25
21
-127
26
22
-128
27
23
-128
28
 
-128
 
24
-129
29
25
DROP TABLE t1;
30
 
CREATE TABLE t1 (uint8 tinyint unsigned not null);
 
26
CREATE TABLE t1 (uint8 int not null);
31
27
INSERT INTO t1 VALUES ('0.1');
32
28
INSERT INTO t1 VALUES ('0.5');
33
29
INSERT INTO t1 VALUES ('127.4');
34
30
INSERT INTO t1 VALUES ('127.5');
35
31
INSERT INTO t1 VALUES ('-0.1');
36
32
INSERT INTO t1 VALUES ('-0.5');
37
 
Warnings:
38
 
Warning 1264    Out of range value for column 'uint8' at row 1
39
33
INSERT INTO t1 VALUES ('255.4');
40
34
INSERT INTO t1 VALUES ('255.5');
41
 
Warnings:
42
 
Warning 1264    Out of range value for column 'uint8' at row 1
43
35
SELECT * FROM t1;
44
36
uint8
45
37
0
47
39
127
48
40
128
49
41
0
50
 
0
51
 
255
52
 
255
 
42
-1
 
43
255
 
44
256
53
45
DROP TABLE t1;
54
 
CREATE TABLE t1 (sint16 smallint not null);
 
46
CREATE TABLE t1 (sint16 int not null);
55
47
INSERT INTO t1 VALUES ('0.1');
56
48
INSERT INTO t1 VALUES ('0.5');
57
49
INSERT INTO t1 VALUES ('32767.4');
58
50
INSERT INTO t1 VALUES ('32767.5');
59
 
Warnings:
60
 
Warning 1264    Out of range value for column 'sint16' at row 1
61
51
INSERT INTO t1 VALUES ('-0.1');
62
52
INSERT INTO t1 VALUES ('-0.5');
63
53
INSERT INTO t1 VALUES ('-32767.4');
64
54
INSERT INTO t1 VALUES ('-32767.5');
65
55
INSERT INTO t1 VALUES ('-32768.4');
66
56
INSERT INTO t1 VALUES ('-32768.5');
67
 
Warnings:
68
 
Warning 1264    Out of range value for column 'sint16' at row 1
69
57
SELECT * FROM t1;
70
58
sint16
71
59
0
72
60
1
73
61
32767
74
 
32767
 
62
32768
75
63
0
76
64
-1
77
65
-32767
78
66
-32768
79
67
-32768
80
 
-32768
 
68
-32769
81
69
DROP TABLE t1;
82
 
CREATE TABLE t1 (uint16 smallint unsigned not null);
 
70
CREATE TABLE t1 (uint16 int not null);
83
71
INSERT INTO t1 VALUES ('0.1');
84
72
INSERT INTO t1 VALUES ('0.5');
85
73
INSERT INTO t1 VALUES ('32767.4');
86
74
INSERT INTO t1 VALUES ('32767.5');
87
75
INSERT INTO t1 VALUES ('-0.1');
88
76
INSERT INTO t1 VALUES ('-0.5');
89
 
Warnings:
90
 
Warning 1264    Out of range value for column 'uint16' at row 1
91
77
INSERT INTO t1 VALUES ('65535.4');
92
78
INSERT INTO t1 VALUES ('65535.5');
93
 
Warnings:
94
 
Warning 1264    Out of range value for column 'uint16' at row 1
95
79
SELECT * FROM t1;
96
80
uint16
97
81
0
99
83
32767
100
84
32768
101
85
0
102
 
0
103
 
65535
104
 
65535
 
86
-1
 
87
65535
 
88
65536
105
89
DROP TABLE t1;
106
 
CREATE TABLE t1 (sint24 mediumint not null);
 
90
CREATE TABLE t1 (sint24 int not null);
107
91
INSERT INTO t1 VALUES ('0.1');
108
92
INSERT INTO t1 VALUES ('0.5');
109
93
INSERT INTO t1 VALUES ('8388607.4');
110
94
INSERT INTO t1 VALUES ('8388607.5');
111
 
Warnings:
112
 
Warning 1264    Out of range value for column 'sint24' at row 1
113
95
INSERT INTO t1 VALUES ('-0.1');
114
96
INSERT INTO t1 VALUES ('-0.5');
115
97
INSERT INTO t1 VALUES ('-8388607.4');
116
98
INSERT INTO t1 VALUES ('-8388607.5');
117
99
INSERT INTO t1 VALUES ('-8388608.4');
118
100
INSERT INTO t1 VALUES ('-8388608.5');
119
 
Warnings:
120
 
Warning 1264    Out of range value for column 'sint24' at row 1
121
101
SELECT * FROM t1;
122
102
sint24
123
103
0
124
104
1
125
105
8388607
126
 
8388607
 
106
8388608
127
107
0
128
108
-1
129
109
-8388607
130
110
-8388608
131
111
-8388608
132
 
-8388608
 
112
-8388609
133
113
DROP TABLE t1;
134
 
CREATE TABLE t1 (uint24 mediumint unsigned not null);
 
114
CREATE TABLE t1 (uint24 int not null);
135
115
INSERT INTO t1 VALUES ('0.1');
136
116
INSERT INTO t1 VALUES ('0.5');
137
117
INSERT INTO t1 VALUES ('8388607.4');
138
118
INSERT INTO t1 VALUES ('8388607.5');
139
119
INSERT INTO t1 VALUES ('-0.1');
140
120
INSERT INTO t1 VALUES ('-0.5');
141
 
Warnings:
142
 
Warning 1264    Out of range value for column 'uint24' at row 1
143
121
INSERT INTO t1 VALUES ('16777215.4');
144
122
INSERT INTO t1 VALUES ('16777215.5');
145
 
Warnings:
146
 
Warning 1264    Out of range value for column 'uint24' at row 1
147
123
SELECT * FROM t1;
148
124
uint24
149
125
0
151
127
8388607
152
128
8388608
153
129
0
154
 
0
155
 
16777215
156
 
16777215
 
130
-1
 
131
16777215
 
132
16777216
157
133
DROP TABLE t1;
158
134
CREATE TABLE t1 (sint64 bigint not null);
159
135
INSERT INTO t1 VALUES ('0.1');
160
136
INSERT INTO t1 VALUES ('0.5');
161
137
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
 
138
INSERT INTO t1 VALUES ('9223372036854775806.5');
165
139
INSERT INTO t1 VALUES ('-0.1');
166
140
INSERT INTO t1 VALUES ('-0.5');
167
141
INSERT INTO t1 VALUES ('-9223372036854775807.4');
168
142
INSERT INTO t1 VALUES ('-9223372036854775807.5');
169
143
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
 
144
INSERT INTO t1 VALUES ('-9223372036854775802.5');
173
145
SELECT * FROM t1;
174
146
sint64
175
147
0
181
153
-9223372036854775807
182
154
-9223372036854775808
183
155
-9223372036854775808
184
 
-9223372036854775808
 
156
-9223372036854775803
185
157
DROP TABLE t1;
186
 
CREATE TABLE t1 (uint64 bigint unsigned not null);
 
158
CREATE TABLE t1 (uint64 bigint not null);
187
159
INSERT INTO t1 VALUES ('0.1');
188
160
INSERT INTO t1 VALUES ('0.5');
189
161
INSERT INTO t1 VALUES ('9223372036854775807.4');
190
162
INSERT INTO t1 VALUES ('9223372036854775807.5');
 
163
ERROR 22003: Out of range value for column 'uint64' at row 1
191
164
INSERT INTO t1 VALUES ('-0.1');
192
165
INSERT INTO t1 VALUES ('-0.5');
193
 
Warnings:
194
 
Warning 1264    Out of range value for column 'uint64' at row 1
195
166
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');
 
167
ERROR 22003: Out of range value for column 'uint64' at row 1
217
168
SELECT * FROM t1;
218
169
uint64
219
170
0
220
171
1
221
172
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
 
173
0
 
174
-1
245
175
DROP TABLE t1;
246
176
CREATE TABLE t1 (str varchar(128), sint64 bigint not null default 0);
247
177
INSERT INTO t1 (str) VALUES ('1.5');