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
0f0051e6
Commit
0f0051e6
authored
Dec 01, 2007
by
kaa@polly.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge polly.(none):/home/kaa/src/maint/bug26788/my50-bug26788
into polly.(none):/home/kaa/src/maint/mysql-5.0-maint
parents
b994abb9
33125cd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
sql/field.cc
sql/field.cc
+2
-1
No files found.
sql/field.cc
View file @
0f0051e6
...
...
@@ -5909,6 +5909,7 @@ int Field_str::store(double nr)
uint
length
;
uint
local_char_length
=
field_length
/
charset
()
->
mbmaxlen
;
double
anr
=
fabs
(
nr
);
bool
fractional
=
(
anr
!=
floor
(
anr
));
int
neg
=
(
nr
<
0.0
)
?
1
:
0
;
uint
max_length
;
int
exp
;
...
...
@@ -5937,7 +5938,7 @@ int Field_str::store(double nr)
calculate the maximum number of significant digits if the 'f'-format
would be used (+1 for decimal point if the number has a fractional part).
*/
digits
=
max
(
0
,
(
int
)
max_length
-
(
nr
!=
trunc
(
nr
))
);
digits
=
max
(
0
,
(
int
)
max_length
-
fractional
);
/*
If the exponent is negative, decrease digits by the number of leading zeros
after the decimal point that do not count as significant digits.
...
...
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