Merge lp:~rwmcfa1/drizzle/fix-bug408694 into lp:~drizzle-trunk/drizzle/development

Proposed by Monty Taylor
Status: Merged
Merged at revision: not available
Proposed branch: lp:~rwmcfa1/drizzle/fix-bug408694
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: None lines
To merge this branch: bzr merge lp:~rwmcfa1/drizzle/fix-bug408694
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+9681@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Monty Taylor (mordred) wrote :

Completes FreeBSD porting.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mystrings/dtoa.cc'
2--- mystrings/dtoa.cc 2009-07-02 17:18:18 +0000
3+++ mystrings/dtoa.cc 2009-08-05 05:08:32 +0000
4@@ -213,8 +213,8 @@
5 if (x < 0.)
6 width--;
7
8- res= dtoa(x, 4, type == MY_GCVT_ARG_DOUBLE ? width : min(width, FLT_DIG),
9- &decpt, &sign, &end);
10+ res= dtoa(x, 4, type == MY_GCVT_ARG_DOUBLE ? min(width, DBL_DIG) :
11+ min(width, FLT_DIG), &decpt, &sign, &end);
12
13 if (decpt == DTOA_OVERFLOW)
14 {
15
16=== modified file 'tests/r/func_group.result'
17--- tests/r/func_group.result 2009-06-16 00:53:22 +0000
18+++ tests/r/func_group.result 2009-08-05 05:54:47 +0000
19@@ -787,7 +787,7 @@
20 330000000
21 select 1e8 * min(df) from t1;
22 1e8 * min(df)
23-110000000.00000001
24+110000000
25 create table t3 (ifl int);
26 insert into t3 values(1), (2);
27 select cast(min(ifl) as decimal(5,2)) from t3;
28@@ -1080,7 +1080,7 @@
29 0.21325764
30 select std(o1/o2) from bug22555;
31 std(o1/o2)
32-0.2132576358664934
33+0.213257635866493
34 select std(e1/e2) from bug22555;
35 std(e1/e2)
36 0.21325764
37@@ -1106,7 +1106,7 @@
38 0.21325763586649340
39 select std(o1/o2) from bug22555;
40 std(o1/o2)
41-0.2132576358664934
42+0.213257635866493
43 select round(std(e1/e2), 17) from bug22555;
44 round(std(e1/e2), 17)
45 0.21325763586649340
46@@ -1131,7 +1131,7 @@
47 0.21325763586649340
48 select std(o1/o2) from bug22555;
49 std(o1/o2)
50-0.2132576358664934
51+0.213257635866493
52 select round(std(e1/e2), 17) from bug22555;
53 round(std(e1/e2), 17)
54 0.21325763586649340
55
56=== modified file 'tests/r/func_math.result'
57--- tests/r/func_math.result 2009-06-16 00:53:22 +0000
58+++ tests/r/func_math.result 2009-08-05 05:54:47 +0000
59@@ -44,7 +44,7 @@
60 Note 1003 select abs(-(10)) AS `abs(-10)`,sign(-(5)) AS `sign(-5)`,sign(5) AS `sign(5)`,sign(0) AS `sign(0)`
61 select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
62 log(exp(10)) exp(log(sqrt(10))*2) log(-1) log(NULL) log(1,1) log(3,9) log(-1,2) log(NULL,2)
63-10 10.000000000000002 NULL NULL NULL 2 NULL NULL
64+10 10 NULL NULL NULL 2 NULL NULL
65 Warnings:
66 Error 1365 Division by 0
67 Error 1365 Division by 0
68@@ -56,7 +56,7 @@
69 Note 1003 select log(exp(10)) AS `log(exp(10))`,exp((log(sqrt(10)) * 2)) AS `exp(log(sqrt(10))*2)`,log(-(1)) AS `log(-1)`,log(NULL) AS `log(NULL)`,log(1,1) AS `log(1,1)`,log(3,9) AS `log(3,9)`,log(-(1),2) AS `log(-1,2)`,log(NULL,2) AS `log(NULL,2)`
70 select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
71 ln(exp(10)) exp(ln(sqrt(10))*2) ln(-1) ln(0) ln(NULL)
72-10 10.000000000000002 NULL NULL NULL
73+10 10 NULL NULL NULL
74 Warnings:
75 Error 1365 Division by 0
76 Error 1365 Division by 0
77@@ -67,7 +67,7 @@
78 Note 1003 select ln(exp(10)) AS `ln(exp(10))`,exp((ln(sqrt(10)) * 2)) AS `exp(ln(sqrt(10))*2)`,ln(-(1)) AS `ln(-1)`,ln(0) AS `ln(0)`,ln(NULL) AS `ln(NULL)`
79 select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
80 log2(8) log2(15) log2(-2) log2(0) log2(NULL)
81-3 3.9068905956085187 NULL NULL NULL
82+3 3.90689059560852 NULL NULL NULL
83 Warnings:
84 Error 1365 Division by 0
85 Error 1365 Division by 0
86@@ -78,7 +78,7 @@
87 Note 1003 select log2(8) AS `log2(8)`,log2(15) AS `log2(15)`,log2(-(2)) AS `log2(-2)`,log2(0) AS `log2(0)`,log2(NULL) AS `log2(NULL)`
88 select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
89 log10(100) log10(18) log10(-4) log10(0) log10(NULL)
90-2 1.255272505103306 NULL NULL NULL
91+2 1.25527250510331 NULL NULL NULL
92 Warnings:
93 Error 1365 Division by 0
94 Error 1365 Division by 0
95@@ -110,7 +110,7 @@
96 Note 1003 select pi() AS `pi()`,format(sin((pi() / 2)),6) AS `format(sin(pi()/2),6)`,format(cos((pi() / 2)),6) AS `format(cos(pi()/2),6)`,format(abs(tan(pi())),6) AS `format(abs(tan(pi())),6)`,format((1 / tan(1)),6) AS `format(cot(1),6)`,format(asin(1),6) AS `format(asin(1),6)`,format(acos(0),6) AS `format(acos(0),6)`,format(atan(1),6) AS `format(atan(1),6)`
97 select degrees(pi()),radians(360);
98 degrees(pi()) radians(360)
99-180 6.283185307179586
100+180 6.28318530717959
101 select format(atan(-2, 2), 6);
102 format(atan(-2, 2), 6)
103 -0.785398
104@@ -128,7 +128,7 @@
105 0
106 SELECT ASIN(1.0);
107 ASIN(1.0)
108-1.5707963267948966
109+1.5707963267949
110 SELECT ACOS(0.2*5.0);
111 ACOS(0.2*5.0)
112 0
113@@ -137,10 +137,10 @@
114 0
115 SELECT ASIN(0.8+0.2);
116 ASIN(0.8+0.2)
117-1.5707963267948966
118+1.5707963267949
119 SELECT ASIN(1.2-0.2);
120 ASIN(1.2-0.2)
121-1.5707963267948966
122+1.5707963267949
123 select format(4.55, 1), format(4.551, 1);
124 format(4.55, 1) format(4.551, 1)
125 4.6 4.6
126@@ -187,28 +187,28 @@
127 INSERT INTO t1 VALUES (1),(1),(1),(2);
128 SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1;
129 RAND(2) * 1000 RAND(a) * 1000
130-655.5866465490186 405.40353712197725
131-122.34661925802624 405.40353712197725
132-644.97318737672 405.40353712197725
133-857.8261098431667 655.5866465490186
134+655.586646549019 405.403537121977
135+122.346619258026 405.403537121977
136+644.97318737672 405.403537121977
137+857.826109843167 655.586646549019
138 SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1 WHERE a = 1;
139 RAND(2) * 1000 RAND(a) * 1000
140-655.5866465490186 405.40353712197725
141-122.34661925802624 405.40353712197725
142-644.97318737672 405.40353712197725
143+655.586646549019 405.403537121977
144+122.346619258026 405.403537121977
145+644.97318737672 405.403537121977
146 INSERT INTO t1 VALUES (3);
147 SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1;
148 RAND(2) * 1000 RAND(a) * 1000
149-655.5866465490186 405.40353712197725
150-122.34661925802624 405.40353712197725
151-644.97318737672 405.40353712197725
152-857.8261098431667 655.5866465490186
153-354.21101781931804 905.7697559760601
154+655.586646549019 405.403537121977
155+122.346619258026 405.403537121977
156+644.97318737672 405.403537121977
157+857.826109843167 655.586646549019
158+354.211017819318 905.76975597606
159 SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1 WHERE a = 1;
160 RAND(2) * 1000 RAND(a) * 1000
161-655.5866465490186 405.40353712197725
162-122.34661925802624 405.40353712197725
163-644.97318737672 405.40353712197725
164+655.586646549019 405.403537121977
165+122.346619258026 405.403537121977
166+644.97318737672 405.403537121977
167 DROP TABLE t1;
168 select round(111,-10);
169 round(111,-10)
170
171=== modified file 'tests/r/func_str.result'
172--- tests/r/func_str.result 2009-07-12 19:26:42 +0000
173+++ tests/r/func_str.result 2009-08-05 05:54:47 +0000
174@@ -810,10 +810,10 @@
175 20.06
176 select conv("18383815659218730760",10,10) + 0;
177 conv("18383815659218730760",10,10) + 0
178-1.838381565921873e19
179+1.83838156592187e19
180 select "18383815659218730760" + 0;
181 "18383815659218730760" + 0
182-1.838381565921873e19
183+1.83838156592187e19
184 CREATE TABLE t1 (code varchar(10));
185 INSERT INTO t1 VALUES ('a12'), ('A12'), ('a13');
186 SELECT ASCII(code), code FROM t1 WHERE code='A12';
187
188=== modified file 'tests/r/parser.result'
189--- tests/r/parser.result 2009-02-28 17:48:22 +0000
190+++ tests/r/parser.result 2009-08-05 05:54:47 +0000
191@@ -389,7 +389,7 @@
192 ERROR 42000: Incorrect parameters in the call to native function 'conv'
193 select atan(10);
194 atan(10)
195-1.4711276743037347
196+1.47112767430373
197 select atan(10 AS p1);
198 ERROR 42000: Incorrect parameters in the call to native function 'atan'
199 select atan(10 p1);
200@@ -400,7 +400,7 @@
201 ERROR 42000: Incorrect parameters in the call to native function 'atan'
202 select atan(10, 20);
203 atan(10, 20)
204-0.4636476090008061
205+0.463647609000806
206 select atan(10 AS p1, 20);
207 ERROR 42000: Incorrect parameters in the call to native function 'atan'
208 select atan(10 p1, 20);
209
210=== modified file 'tests/r/type_float.result'
211--- tests/r/type_float.result 2009-06-17 06:44:38 +0000
212+++ tests/r/type_float.result 2009-08-05 05:54:47 +0000
213@@ -4,7 +4,7 @@
214 10 10.0 10 10 10
215 SELECT 6e-16, -6e-16, --6e-16, -6e-16+1.000000;
216 6e-16 -6e-16 --6e-16 -6e-16+1.000000
217-6e-16 -6e-16 6e-16 0.9999999999999994
218+6e-16 -6e-16 6e-16 0.999999999999999
219 SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1;
220 1e1 1.e1 1.0e1 1e+1 1.e+1 1.0e+1 1e-1 1.e-1 1.0e-1
221 10 10 10 10 10 10 0.1 0.1 0.1
222@@ -84,7 +84,7 @@
223 create table t2 select c1 + c1 * (c2 / 100) as col1, round(c1, 5) as col2, round(c1, 35) as col3, sqrt(c1*1e-15) col4 from t1;
224 select * from t2;
225 col1 col2 col3 col4
226-140.36 121.00000 121 0.00000034785054261852176
227+140.36 121.00000 121 0.000000347850542618522
228 show create table t2;
229 Table Create Table
230 t2 CREATE TABLE `t2` (
231@@ -343,12 +343,12 @@
232 INSERT INTO d1 VALUES (1.7976931348623157E+308);
233 SELECT * FROM d1;
234 d
235-1.7976931348623157e308
236+1.79769313486232e308
237 INSERT INTO d1 VALUES (1.79769313486232e+308);
238 ERROR 22007: Illegal double '1.79769313486232e+308' value found during parsing
239 SELECT * FROM d1;
240 d
241-1.7976931348623157e308
242+1.79769313486232e308
243 DROP TABLE d1;
244 create table t1 (a char(20));
245 insert into t1 values (1.225e-05);
246
247=== modified file 'tests/r/type_newdecimal.result'
248--- tests/r/type_newdecimal.result 2009-04-01 01:27:08 +0000
249+++ tests/r/type_newdecimal.result 2009-08-05 05:54:47 +0000
250@@ -666,7 +666,7 @@
251 0.000000000100000
252 select ln(14000) c1, convert(ln(14000),decimal(5,3)) c2, cast(ln(14000) as decimal(5,3)) c3;
253 c1 c2 c3
254-9.546812608597396 9.547 9.547
255+9.5468126085974 9.547 9.547
256 select convert(ln(14000),decimal(2,3)) c1;
257 ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '').
258 select cast(ln(14000) as decimal(2,3)) c1;