Debian Codegraph @

mysql-test/suite/engines/funcs/r/in_number_length.result

raw
1 DROP TABLE IF EXISTS t4,t5;
2 CREATE TABLE t4(c1 DECIMAL(1,0) NOT NULL);
3 INSERT INTO t4 (c1) VALUES(0);
4 INSERT INTO t4 (c1) VALUES(1.0);
5 INSERT INTO t4 (c1) VALUES(-9.0);
6 SELECT * FROM t4;
7 c1
8 0
9 1
10 -9
11 SELECT COUNT(c1) AS total_rows FROM t4;
12 total_rows
13 3
14 SELECT COUNT(c1) AS positive_rows FROM t4 WHERE c1 > 0.0;
15 positive_rows
16 1
17 SELECT COUNT(c1) AS negative_rows FROM t4 WHERE c1 < 0.0;
18 negative_rows
19 1
20 SELECT COUNT(c1) AS zero_rows FROM t4 WHERE c1 = 0.0;
21 zero_rows
22 1
23 DROP TABLE t4;
24 CREATE TABLE t5(c1 DECIMAL(5,4) NOT NULL);
25 INSERT INTO t5 (c1) VALUES(0);
26 INSERT INTO t5 (c1) VALUES(1.0);
27 INSERT INTO t5 (c1) VALUES(1.2345);
28 INSERT INTO t5 (c1) VALUES(-9.0);
29 INSERT INTO t5 (c1) VALUES(-9.12345);
30 Warnings:
31 Note 1265 Data truncated for column 'c1' at row 1
32 SELECT * FROM t5;
33 c1
34 0.0000
35 1.0000
36 1.2345
37 -9.0000
38 -9.1235
39 SELECT COUNT(c1) AS positive_rows FROM t5 WHERE c1 > 0.0;
40 positive_rows
41 2
42 SELECT COUNT(c1) AS negative_rows FROM t5 WHERE c1 < 0.0;
43 negative_rows
44 2
45 SELECT COUNT(c1) AS zero_rows FROM t5 WHERE c1 = 0.0;
46 zero_rows
47 1
48 DROP TABLE t5;
49 CREATE TABLE t4(c1 DEC(1,0) NOT NULL);
50 INSERT INTO t4 (c1) VALUES(0);
51 INSERT INTO t4 (c1) VALUES(1.0);
52 INSERT INTO t4 (c1) VALUES(-9.0);
53 SELECT * FROM t4;
54 c1
55 0
56 1
57 -9
58 SELECT COUNT(c1) AS total_rows FROM t4;
59 total_rows
60 3
61 SELECT COUNT(c1) AS positive_rows FROM t4 WHERE c1 > 0.0;
62 positive_rows
63 1
64 SELECT COUNT(c1) AS negative_rows FROM t4 WHERE c1 < 0.0;
65 negative_rows
66 1
67 SELECT COUNT(c1) AS zero_rows FROM t4 WHERE c1 = 0.0;
68 zero_rows
69 1
70 DROP TABLE t4;
71 CREATE TABLE t5(c1 DEC(5,4) NOT NULL);
72 INSERT INTO t5 (c1) VALUES(0);
73 INSERT INTO t5 (c1) VALUES(1.0);
74 INSERT INTO t5 (c1) VALUES(1.2345);
75 INSERT INTO t5 (c1) VALUES(-9.0);
76 INSERT INTO t5 (c1) VALUES(-9.12345);
77 Warnings:
78 Note 1265 Data truncated for column 'c1' at row 1
79 SELECT * FROM t5;
80 c1
81 0.0000
82 1.0000
83 1.2345
84 -9.0000
85 -9.1235
86 SELECT COUNT(c1) AS positive_rows FROM t5 WHERE c1 > 0.0;
87 positive_rows
88 2
89 SELECT COUNT(c1) AS negative_rows FROM t5 WHERE c1 < 0.0;
90 negative_rows
91 2
92 SELECT COUNT(c1) AS zero_rows FROM t5 WHERE c1 = 0.0;
93 zero_rows
94 1
95 DROP TABLE t5;
96 CREATE TABLE t4(c1 FIXED(1,0) NOT NULL);
97 INSERT INTO t4 (c1) VALUES(0);
98 INSERT INTO t4 (c1) VALUES(1.0);
99 INSERT INTO t4 (c1) VALUES(-9.0);
100 SELECT * FROM t4;
101 c1
102 0
103 1
104 -9
105 SELECT COUNT(c1) AS total_rows FROM t4;
106 total_rows
107 3
108 SELECT COUNT(c1) AS positive_rows FROM t4 WHERE c1 > 0.0;
109 positive_rows
110 1
111 SELECT COUNT(c1) AS negative_rows FROM t4 WHERE c1 < 0.0;
112 negative_rows
113 1
114 SELECT COUNT(c1) AS zero_rows FROM t4 WHERE c1 = 0.0;
115 zero_rows
116 1
117 DROP TABLE t4;
118 CREATE TABLE t5(c1 FIXED(5,4) NOT NULL);
119 INSERT INTO t5 (c1) VALUES(0);
120 INSERT INTO t5 (c1) VALUES(1.0);
121 INSERT INTO t5 (c1) VALUES(1.2345);
122 INSERT INTO t5 (c1) VALUES(-9.0);
123 INSERT INTO t5 (c1) VALUES(-9.12345);
124 Warnings:
125 Note 1265 Data truncated for column 'c1' at row 1
126 SELECT * FROM t5;
127 c1
128 0.0000
129 1.0000
130 1.2345
131 -9.0000
132 -9.1235
133 SELECT COUNT(c1) AS positive_rows FROM t5 WHERE c1 > 0.0;
134 positive_rows
135 2
136 SELECT COUNT(c1) AS negative_rows FROM t5 WHERE c1 < 0.0;
137 negative_rows
138 2
139 SELECT COUNT(c1) AS zero_rows FROM t5 WHERE c1 = 0.0;
140 zero_rows
141 1
142 DROP TABLE t5;
143 CREATE TABLE t4(c1 NUMERIC(1,0) NOT NULL);
144 INSERT INTO t4 (c1) VALUES(0);
145 INSERT INTO t4 (c1) VALUES(1.0);
146 INSERT INTO t4 (c1) VALUES(-9.0);
147 SELECT * FROM t4;
148 c1
149 0
150 1
151 -9
152 SELECT COUNT(c1) AS total_rows FROM t4;
153 total_rows
154 3
155 SELECT COUNT(c1) AS positive_rows FROM t4 WHERE c1 > 0.0;
156 positive_rows
157 1
158 SELECT COUNT(c1) AS negative_rows FROM t4 WHERE c1 < 0.0;
159 negative_rows
160 1
161 SELECT COUNT(c1) AS zero_rows FROM t4 WHERE c1 = 0.0;
162 zero_rows
163 1
164 DROP TABLE t4;
165 CREATE TABLE t5(c1 NUMERIC(5,4) NOT NULL);
166 INSERT INTO t5 (c1) VALUES(0);
167 INSERT INTO t5 (c1) VALUES(1.0);
168 INSERT INTO t5 (c1) VALUES(1.2345);
169 INSERT INTO t5 (c1) VALUES(-9.0);
170 INSERT INTO t5 (c1) VALUES(-9.12345);
171 Warnings:
172 Note 1265 Data truncated for column 'c1' at row 1
173 SELECT * FROM t5;
174 c1
175 0.0000
176 1.0000
177 1.2345
178 -9.0000
179 -9.1235
180 SELECT COUNT(c1) AS positive_rows FROM t5 WHERE c1 > 0.0;
181 positive_rows
182 2
183 SELECT COUNT(c1) AS negative_rows FROM t5 WHERE c1 < 0.0;
184 negative_rows
185 2
186 SELECT COUNT(c1) AS zero_rows FROM t5 WHERE c1 = 0.0;
187 zero_rows
188 1
189 DROP TABLE t5;
190 CREATE TABLE t4(c1 DOUBLE(1,0) NOT NULL);
191 Warnings:
192 Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
193 INSERT INTO t4 (c1) VALUES(0);
194 INSERT INTO t4 (c1) VALUES(1.0);
195 INSERT INTO t4 (c1) VALUES(-9.0);
196 SELECT * FROM t4;
197 c1
198 0
199 1
200 -9
201 SELECT COUNT(c1) AS total_rows FROM t4;
202 total_rows
203 3
204 SELECT COUNT(c1) AS positive_rows FROM t4 WHERE c1 > 0.0;
205 positive_rows
206 1
207 SELECT COUNT(c1) AS negative_rows FROM t4 WHERE c1 < 0.0;
208 negative_rows
209 1
210 SELECT COUNT(c1) AS zero_rows FROM t4 WHERE c1 = 0.0;
211 zero_rows
212 1
213 DROP TABLE t4;
214 CREATE TABLE t5(c1 DOUBLE(5,4) NOT NULL);
215 Warnings:
216 Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
217 INSERT INTO t5 (c1) VALUES(0);
218 INSERT INTO t5 (c1) VALUES(1.0);
219 INSERT INTO t5 (c1) VALUES(1.2345);
220 INSERT INTO t5 (c1) VALUES(-9.0);
221 INSERT INTO t5 (c1) VALUES(-9.12345);
222 SELECT * FROM t5;
223 c1
224 0.0000
225 1.0000
226 1.2345
227 -9.0000
228 -9.1234
229 SELECT COUNT(c1) AS positive_rows FROM t5 WHERE c1 > 0.0;
230 positive_rows
231 2
232 SELECT COUNT(c1) AS negative_rows FROM t5 WHERE c1 < 0.0;
233 negative_rows
234 2
235 SELECT COUNT(c1) AS zero_rows FROM t5 WHERE c1 = 0.0;
236 zero_rows
237 1
238 DROP TABLE t5;
239 CREATE TABLE t4(c1 REAL(1,0) NOT NULL);
240 Warnings:
241 Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
242 INSERT INTO t4 (c1) VALUES(0);
243 INSERT INTO t4 (c1) VALUES(1.0);
244 INSERT INTO t4 (c1) VALUES(-9.0);
245 SELECT * FROM t4;
246 c1
247 0
248 1
249 -9
250 SELECT COUNT(c1) AS total_rows FROM t4;
251 total_rows
252 3
253 SELECT COUNT(c1) AS positive_rows FROM t4 WHERE c1 > 0.0;
254 positive_rows
255 1
256 SELECT COUNT(c1) AS negative_rows FROM t4 WHERE c1 < 0.0;
257 negative_rows
258 1
259 SELECT COUNT(c1) AS zero_rows FROM t4 WHERE c1 = 0.0;
260 zero_rows
261 1
262 DROP TABLE t4;
263 CREATE TABLE t5(c1 REAL(5,4) NOT NULL);
264 Warnings:
265 Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
266 INSERT INTO t5 (c1) VALUES(0);
267 INSERT INTO t5 (c1) VALUES(1.0);
268 INSERT INTO t5 (c1) VALUES(1.2345);
269 INSERT INTO t5 (c1) VALUES(-9.0);
270 INSERT INTO t5 (c1) VALUES(-9.12345);
271 SELECT * FROM t5;
272 c1
273 0.0000
274 1.0000
275 1.2345
276 -9.0000
277 -9.1234
278 SELECT COUNT(c1) AS positive_rows FROM t5 WHERE c1 > 0.0;
279 positive_rows
280 2
281 SELECT COUNT(c1) AS negative_rows FROM t5 WHERE c1 < 0.0;
282 negative_rows
283 2
284 SELECT COUNT(c1) AS zero_rows FROM t5 WHERE c1 = 0.0;
285 zero_rows
286 1
287 DROP TABLE t5;
288 CREATE TABLE t4(c1 DOUBLE PRECISION(1,0) NOT NULL);
289 Warnings:
290 Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
291 INSERT INTO t4 (c1) VALUES(0);
292 INSERT INTO t4 (c1) VALUES(1.0);
293 INSERT INTO t4 (c1) VALUES(-9.0);
294 SELECT * FROM t4;
295 c1
296 0
297 1
298 -9
299 SELECT COUNT(c1) AS total_rows FROM t4;
300 total_rows
301 3
302 SELECT COUNT(c1) AS positive_rows FROM t4 WHERE c1 > 0.0;
303 positive_rows
304 1
305 SELECT COUNT(c1) AS negative_rows FROM t4 WHERE c1 < 0.0;
306 negative_rows
307 1
308 SELECT COUNT(c1) AS zero_rows FROM t4 WHERE c1 = 0.0;
309 zero_rows
310 1
311 DROP TABLE t4;
312 CREATE TABLE t5(c1 DOUBLE PRECISION(5,4) NOT NULL);
313 Warnings:
314 Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
315 INSERT INTO t5 (c1) VALUES(0);
316 INSERT INTO t5 (c1) VALUES(1.0);
317 INSERT INTO t5 (c1) VALUES(1.2345);
318 INSERT INTO t5 (c1) VALUES(-9.0);
319 INSERT INTO t5 (c1) VALUES(-9.12345);
320 SELECT * FROM t5;
321 c1
322 0.0000
323 1.0000
324 1.2345
325 -9.0000
326 -9.1234
327 SELECT COUNT(c1) AS positive_rows FROM t5 WHERE c1 > 0.0;
328 positive_rows
329 2
330 SELECT COUNT(c1) AS negative_rows FROM t5 WHERE c1 < 0.0;
331 negative_rows
332 2
333 SELECT COUNT(c1) AS zero_rows FROM t5 WHERE c1 = 0.0;
334 zero_rows
335 1
336 DROP TABLE t5;
337 CREATE TABLE t4(c1 FLOAT(1,0) NOT NULL);
338 Warnings:
339 Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
340 INSERT INTO t4 (c1) VALUES(0);
341 INSERT INTO t4 (c1) VALUES(1.0);
342 INSERT INTO t4 (c1) VALUES(-9.0);
343 SELECT * FROM t4;
344 c1
345 0
346 1
347 -9
348 SELECT COUNT(c1) AS total_rows FROM t4;
349 total_rows
350 3
351 SELECT COUNT(c1) AS positive_rows FROM t4 WHERE c1 > 0.0;
352 positive_rows
353 1
354 SELECT COUNT(c1) AS negative_rows FROM t4 WHERE c1 < 0.0;
355 negative_rows
356 1
357 SELECT COUNT(c1) AS zero_rows FROM t4 WHERE c1 = 0.0;
358 zero_rows
359 1
360 DROP TABLE t4;
361 CREATE TABLE t5(c1 FLOAT(5,4) NOT NULL);
362 Warnings:
363 Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
364 INSERT INTO t5 (c1) VALUES(0);
365 INSERT INTO t5 (c1) VALUES(1.0);
366 INSERT INTO t5 (c1) VALUES(1.2345);
367 INSERT INTO t5 (c1) VALUES(-9.0);
368 INSERT INTO t5 (c1) VALUES(-9.12345);
369 SELECT * FROM t5;
370 c1
371 0.0000
372 1.0000
373 1.2345
374 -9.0000
375 -9.1234
376 SELECT COUNT(c1) AS positive_rows FROM t5 WHERE c1 > 0.0;
377 positive_rows
378 2
379 SELECT COUNT(c1) AS negative_rows FROM t5 WHERE c1 < 0.0;
380 negative_rows
381 2
382 SELECT COUNT(c1) AS zero_rows FROM t5 WHERE c1 = 0.0;
383 zero_rows
384 1
385 DROP TABLE t5;