~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to tests/r/round.result

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-03-18 12:12:31 UTC
  • Revision ID: james.westby@ubuntu.com-20100318121231-k6g1xe6cshbwa0f8
Tags: upstream-2010.03.1347
ImportĀ upstreamĀ versionĀ 2010.03.1347

Show diffs side-by-side

added added

removed removed

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