Debian Codegraph @

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

raw
1 SET SQL_MODE="TRADITIONAL,ANSI";
2 DROP TABLE IF EXISTS t5;
3 CREATE TABLE t5(c1 DECIMAL(5,4) UNSIGNED NOT NULL);
4 INSERT INTO t5 (c1) VALUES(NULL);
5 ERROR 23000: Column 'c1' cannot be null
6 INSERT INTO t5 (c1) VALUES(0);
7 INSERT INTO t5 (c1) VALUES(-1);
8 ERROR 22003: Out of range value for column 'c1' at row 1
9 INSERT INTO t5 (c1) VALUES('x');
10 ERROR 22007: Incorrect decimal value: 'x' for column `test`.`t5`.`c1` at row 1
11 INSERT INTO t5 (c1) VALUES(999999);
12 ERROR 22003: Out of range value for column 'c1' at row 1
13 SELECT COUNT(c1) AS total_rows FROM t5;
14 total_rows
15 1
16 SELECT COUNT(c1) AS null_rows FROM t5 WHERE c1 IS NULL;
17 null_rows
18 0
19 SELECT COUNT(c1) AS not_null_rows FROM t5 WHERE c1 IS NOT NULL;
20 not_null_rows
21 1
22 DROP TABLE t5;
23 CREATE TABLE t5(c1 DEC(5,4) UNSIGNED NOT NULL);
24 INSERT INTO t5 (c1) VALUES(NULL);
25 ERROR 23000: Column 'c1' cannot be null
26 INSERT INTO t5 (c1) VALUES(0);
27 INSERT INTO t5 (c1) VALUES(-1);
28 ERROR 22003: Out of range value for column 'c1' at row 1
29 INSERT INTO t5 (c1) VALUES('x');
30 ERROR 22007: Incorrect decimal value: 'x' for column `test`.`t5`.`c1` at row 1
31 INSERT INTO t5 (c1) VALUES(999999);
32 ERROR 22003: Out of range value for column 'c1' at row 1
33 SELECT COUNT(c1) AS total_rows FROM t5;
34 total_rows
35 1
36 SELECT COUNT(c1) AS null_rows FROM t5 WHERE c1 IS NULL;
37 null_rows
38 0
39 SELECT COUNT(c1) AS not_null_rows FROM t5 WHERE c1 IS NOT NULL;
40 not_null_rows
41 1
42 DROP TABLE t5;
43 CREATE TABLE t5(c1 FIXED(5,4) UNSIGNED NOT NULL);
44 INSERT INTO t5 (c1) VALUES(NULL);
45 ERROR 23000: Column 'c1' cannot be null
46 INSERT INTO t5 (c1) VALUES(0);
47 INSERT INTO t5 (c1) VALUES(-1);
48 ERROR 22003: Out of range value for column 'c1' at row 1
49 INSERT INTO t5 (c1) VALUES('x');
50 ERROR 22007: Incorrect decimal value: 'x' for column `test`.`t5`.`c1` at row 1
51 INSERT INTO t5 (c1) VALUES(999999);
52 ERROR 22003: Out of range value for column 'c1' at row 1
53 SELECT COUNT(c1) AS total_rows FROM t5;
54 total_rows
55 1
56 SELECT COUNT(c1) AS null_rows FROM t5 WHERE c1 IS NULL;
57 null_rows
58 0
59 SELECT COUNT(c1) AS not_null_rows FROM t5 WHERE c1 IS NOT NULL;
60 not_null_rows
61 1
62 DROP TABLE t5;
63 CREATE TABLE t5(c1 NUMERIC(5,4) UNSIGNED NOT NULL);
64 INSERT INTO t5 (c1) VALUES(NULL);
65 ERROR 23000: Column 'c1' cannot be null
66 INSERT INTO t5 (c1) VALUES(0);
67 INSERT INTO t5 (c1) VALUES(-1);
68 ERROR 22003: Out of range value for column 'c1' at row 1
69 INSERT INTO t5 (c1) VALUES('x');
70 ERROR 22007: Incorrect decimal value: 'x' for column `test`.`t5`.`c1` at row 1
71 INSERT INTO t5 (c1) VALUES(999999);
72 ERROR 22003: Out of range value for column 'c1' at row 1
73 SELECT COUNT(c1) AS total_rows FROM t5;
74 total_rows
75 1
76 SELECT COUNT(c1) AS null_rows FROM t5 WHERE c1 IS NULL;
77 null_rows
78 0
79 SELECT COUNT(c1) AS not_null_rows FROM t5 WHERE c1 IS NOT NULL;
80 not_null_rows
81 1
82 DROP TABLE t5;