1
by brian
clean slate |
1 |
--disable_warnings
|
2 |
DROP TABLE IF EXISTS t1; |
|
3 |
--enable_warnings
|
|
4 |
||
5 |
CREATE TABLE t1 (sint8 tinyint not null); |
|
6 |
INSERT INTO t1 VALUES ('0.1'); |
|
7 |
INSERT INTO t1 VALUES ('0.5'); |
|
8 |
INSERT INTO t1 VALUES ('127.4'); |
|
9 |
INSERT INTO t1 VALUES ('127.5'); |
|
10 |
INSERT INTO t1 VALUES ('-0.1'); |
|
11 |
INSERT INTO t1 VALUES ('-0.5'); |
|
12 |
INSERT INTO t1 VALUES ('-127.4'); |
|
13 |
INSERT INTO t1 VALUES ('-127.5'); |
|
14 |
INSERT INTO t1 VALUES ('-128.4'); |
|
15 |
INSERT INTO t1 VALUES ('-128.5'); |
|
16 |
SELECT * FROM t1; |
|
17 |
DROP TABLE t1; |
|
18 |
||
19 |
CREATE TABLE t1 (uint8 tinyint unsigned not null); |
|
20 |
INSERT INTO t1 VALUES ('0.1'); |
|
21 |
INSERT INTO t1 VALUES ('0.5'); |
|
22 |
INSERT INTO t1 VALUES ('127.4'); |
|
23 |
INSERT INTO t1 VALUES ('127.5'); |
|
24 |
INSERT INTO t1 VALUES ('-0.1'); |
|
25 |
INSERT INTO t1 VALUES ('-0.5'); |
|
26 |
INSERT INTO t1 VALUES ('255.4'); |
|
27 |
INSERT INTO t1 VALUES ('255.5'); |
|
28 |
SELECT * FROM t1; |
|
29 |
DROP TABLE t1; |
|
30 |
||
31 |
||
32 |
CREATE TABLE t1 (sint16 smallint not null); |
|
33 |
INSERT INTO t1 VALUES ('0.1'); |
|
34 |
INSERT INTO t1 VALUES ('0.5'); |
|
35 |
INSERT INTO t1 VALUES ('32767.4'); |
|
36 |
INSERT INTO t1 VALUES ('32767.5'); |
|
37 |
INSERT INTO t1 VALUES ('-0.1'); |
|
38 |
INSERT INTO t1 VALUES ('-0.5'); |
|
39 |
INSERT INTO t1 VALUES ('-32767.4'); |
|
40 |
INSERT INTO t1 VALUES ('-32767.5'); |
|
41 |
INSERT INTO t1 VALUES ('-32768.4'); |
|
42 |
INSERT INTO t1 VALUES ('-32768.5'); |
|
43 |
SELECT * FROM t1; |
|
44 |
DROP TABLE t1; |
|
45 |
||
46 |
||
47 |
CREATE TABLE t1 (uint16 smallint unsigned not null); |
|
48 |
INSERT INTO t1 VALUES ('0.1'); |
|
49 |
INSERT INTO t1 VALUES ('0.5'); |
|
50 |
INSERT INTO t1 VALUES ('32767.4'); |
|
51 |
INSERT INTO t1 VALUES ('32767.5'); |
|
52 |
INSERT INTO t1 VALUES ('-0.1'); |
|
53 |
INSERT INTO t1 VALUES ('-0.5'); |
|
54 |
INSERT INTO t1 VALUES ('65535.4'); |
|
55 |
INSERT INTO t1 VALUES ('65535.5'); |
|
56 |
SELECT * FROM t1; |
|
57 |
DROP TABLE t1; |
|
58 |
||
59 |
CREATE TABLE t1 (sint24 mediumint not null); |
|
60 |
INSERT INTO t1 VALUES ('0.1'); |
|
61 |
INSERT INTO t1 VALUES ('0.5'); |
|
62 |
INSERT INTO t1 VALUES ('8388607.4'); |
|
63 |
INSERT INTO t1 VALUES ('8388607.5'); |
|
64 |
INSERT INTO t1 VALUES ('-0.1'); |
|
65 |
INSERT INTO t1 VALUES ('-0.5'); |
|
66 |
INSERT INTO t1 VALUES ('-8388607.4'); |
|
67 |
INSERT INTO t1 VALUES ('-8388607.5'); |
|
68 |
INSERT INTO t1 VALUES ('-8388608.4'); |
|
69 |
INSERT INTO t1 VALUES ('-8388608.5'); |
|
70 |
SELECT * FROM t1; |
|
71 |
DROP TABLE t1; |
|
72 |
||
73 |
CREATE TABLE t1 (uint24 mediumint unsigned not null); |
|
74 |
INSERT INTO t1 VALUES ('0.1'); |
|
75 |
INSERT INTO t1 VALUES ('0.5'); |
|
76 |
INSERT INTO t1 VALUES ('8388607.4'); |
|
77 |
INSERT INTO t1 VALUES ('8388607.5'); |
|
78 |
INSERT INTO t1 VALUES ('-0.1'); |
|
79 |
INSERT INTO t1 VALUES ('-0.5'); |
|
80 |
INSERT INTO t1 VALUES ('16777215.4'); |
|
81 |
INSERT INTO t1 VALUES ('16777215.5'); |
|
82 |
SELECT * FROM t1; |
|
83 |
DROP TABLE t1; |
|
84 |
||
85 |
CREATE TABLE t1 (sint64 bigint not null); |
|
86 |
INSERT INTO t1 VALUES ('0.1'); |
|
87 |
INSERT INTO t1 VALUES ('0.5'); |
|
88 |
INSERT INTO t1 VALUES ('9223372036854775807.4'); |
|
89 |
INSERT INTO t1 VALUES ('9223372036854775807.5'); |
|
90 |
INSERT INTO t1 VALUES ('-0.1'); |
|
91 |
INSERT INTO t1 VALUES ('-0.5'); |
|
92 |
INSERT INTO t1 VALUES ('-9223372036854775807.4'); |
|
93 |
INSERT INTO t1 VALUES ('-9223372036854775807.5'); |
|
94 |
INSERT INTO t1 VALUES ('-9223372036854775808.4'); |
|
95 |
INSERT INTO t1 VALUES ('-9223372036854775808.5'); |
|
96 |
SELECT * FROM t1; |
|
97 |
DROP TABLE t1; |
|
98 |
||
99 |
CREATE TABLE t1 (uint64 bigint unsigned not null); |
|
100 |
INSERT INTO t1 VALUES ('0.1'); |
|
101 |
INSERT INTO t1 VALUES ('0.5'); |
|
102 |
INSERT INTO t1 VALUES ('9223372036854775807.4'); |
|
103 |
INSERT INTO t1 VALUES ('9223372036854775807.5'); |
|
104 |
INSERT INTO t1 VALUES ('-0.1'); |
|
105 |
INSERT INTO t1 VALUES ('-0.5'); |
|
106 |
INSERT INTO t1 VALUES ('18446744073709551615.4'); |
|
107 |
INSERT INTO t1 VALUES ('18446744073709551615.5'); |
|
108 |
INSERT INTO t1 VALUES ('1844674407370955161.0'); |
|
109 |
INSERT INTO t1 VALUES ('1844674407370955161.1'); |
|
110 |
INSERT INTO t1 VALUES ('1844674407370955161.2'); |
|
111 |
INSERT INTO t1 VALUES ('1844674407370955161.3'); |
|
112 |
INSERT INTO t1 VALUES ('1844674407370955161.4'); |
|
113 |
INSERT INTO t1 VALUES ('1844674407370955161.5'); |
|
114 |
INSERT INTO t1 VALUES ('1844674407370955161.0e1'); |
|
115 |
INSERT INTO t1 VALUES ('1844674407370955161.1e1'); |
|
116 |
INSERT INTO t1 VALUES ('1844674407370955161.2e1'); |
|
117 |
INSERT INTO t1 VALUES ('1844674407370955161.3e1'); |
|
118 |
INSERT INTO t1 VALUES ('1844674407370955161.4e1'); |
|
119 |
INSERT INTO t1 VALUES ('1844674407370955161.5e1'); |
|
120 |
INSERT INTO t1 VALUES ('18446744073709551610e-1'); |
|
121 |
INSERT INTO t1 VALUES ('18446744073709551611e-1'); |
|
122 |
INSERT INTO t1 VALUES ('18446744073709551612e-1'); |
|
123 |
INSERT INTO t1 VALUES ('18446744073709551613e-1'); |
|
124 |
INSERT INTO t1 VALUES ('18446744073709551614e-1'); |
|
125 |
INSERT INTO t1 VALUES ('18446744073709551615e-1'); |
|
126 |
SELECT * FROM t1; |
|
127 |
DROP TABLE t1; |
|
128 |
||
129 |
CREATE TABLE t1 (str varchar(128), sint64 bigint not null default 0); |
|
130 |
INSERT INTO t1 (str) VALUES ('1.5'); |
|
131 |
INSERT INTO t1 (str) VALUES ('1.00005e4'); |
|
132 |
INSERT INTO t1 (str) VALUES ('1.0005e3'); |
|
133 |
INSERT INTO t1 (str) VALUES ('1.005e2'); |
|
134 |
INSERT INTO t1 (str) VALUES ('1.05e1'); |
|
135 |
INSERT INTO t1 (str) VALUES ('1.5e0'); |
|
136 |
INSERT INTO t1 (str) VALUES ('100005e-1'); |
|
137 |
INSERT INTO t1 (str) VALUES ('100050e-2'); |
|
138 |
INSERT INTO t1 (str) VALUES ('100500e-3'); |
|
139 |
INSERT INTO t1 (str) VALUES ('105000e-4'); |
|
140 |
INSERT INTO t1 (str) VALUES ('150000e-5'); |
|
141 |
UPDATE t1 SET sint64=str; |
|
142 |
SELECT * FROM t1; |
|
143 |
DROP TABLE t1; |
|
144 |
||
145 |