Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a63413b8
Commit
a63413b8
authored
Nov 14, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge polly.local:/tmp/maint/bug22129/my50-bug22129
into polly.local:/home/kaa/src/maint/mysql-5.0-maint
parents
c21f4e6e
a4e94560
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
17 deletions
+5
-17
mysql-test/r/type_float.result
mysql-test/r/type_float.result
+1
-1
strings/strtod.c
strings/strtod.c
+4
-16
No files found.
mysql-test/r/type_float.result
View file @
a63413b8
...
@@ -264,7 +264,7 @@ a decimal(21,2) NO 0.00
...
@@ -264,7 +264,7 @@ a decimal(21,2) NO 0.00
drop table t1,t2,t3;
drop table t1,t2,t3;
select 1e-308, 1.00000001e-300, 100000000e-300;
select 1e-308, 1.00000001e-300, 100000000e-300;
1e-308 1.00000001e-300 100000000e-300
1e-308 1.00000001e-300 100000000e-300
0
1.00000001e-300 1e-292
1e-308
1.00000001e-300 1e-292
select 10e307;
select 10e307;
10e307
10e307
1e+308
1e+308
...
...
strings/strtod.c
View file @
a63413b8
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
#define MAX_DBL_EXP 308
#define MAX_DBL_EXP 308
#define MAX_RESULT_FOR_MAX_EXP 1.7976931348623157
#define MAX_RESULT_FOR_MAX_EXP 1.7976931348623157
#define MIN_RESULT_FOR_MIN_EXP 2.225073858507202
static
double
scaler10
[]
=
{
static
double
scaler10
[]
=
{
1
.
0
,
1e10
,
1e20
,
1e30
,
1e40
,
1e50
,
1e60
,
1e70
,
1e80
,
1e90
1
.
0
,
1e10
,
1e20
,
1e30
,
1e40
,
1e50
,
1e60
,
1e70
,
1e80
,
1e90
};
};
...
@@ -161,28 +160,17 @@ double my_strtod(const char *str, char **end_ptr, int *error)
...
@@ -161,28 +160,17 @@ double my_strtod(const char *str, char **end_ptr, int *error)
order
=
exp
+
(
neg_exp
?
-
1
:
1
)
*
(
ndigits
-
1
);
order
=
exp
+
(
neg_exp
?
-
1
:
1
)
*
(
ndigits
-
1
);
if
(
order
<
0
)
if
(
order
<
0
)
order
=
-
order
;
order
=
-
order
;
if
(
order
>=
MAX_DBL_EXP
&&
result
)
if
(
order
>=
MAX_DBL_EXP
&&
!
neg_exp
&&
result
)
{
{
double
c
;
double
c
;
/* Compute modulus of C (see comment above) */
/* Compute modulus of C (see comment above) */
c
=
result
/
scaler
*
10
.
0
;
c
=
result
/
scaler
*
10
.
0
;
if
(
neg_exp
)
{
if
(
order
>
MAX_DBL_EXP
||
c
<
MIN_RESULT_FOR_MIN_EXP
)
{
result
=
0
.
0
;
goto
done
;
}
}
else
{
if
(
order
>
MAX_DBL_EXP
||
c
>
MAX_RESULT_FOR_MAX_EXP
)
if
(
order
>
MAX_DBL_EXP
||
c
>
MAX_RESULT_FOR_MAX_EXP
)
{
{
overflow
=
1
;
overflow
=
1
;
goto
done
;
goto
done
;
}
}
}
}
}
exp
=
tmp_exp
;
exp
=
tmp_exp
;
if
(
exp
<
0
)
if
(
exp
<
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment