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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
777df295
Commit
777df295
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/bug26788/my51-bug26788
parents
109c0439
33125cd4
Changes
1
Show 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 @
777df295
...
@@ -6261,6 +6261,7 @@ int Field_str::store(double nr)
...
@@ -6261,6 +6261,7 @@ int Field_str::store(double nr)
uint
length
;
uint
length
;
uint
local_char_length
=
field_length
/
charset
()
->
mbmaxlen
;
uint
local_char_length
=
field_length
/
charset
()
->
mbmaxlen
;
double
anr
=
fabs
(
nr
);
double
anr
=
fabs
(
nr
);
bool
fractional
=
(
anr
!=
floor
(
anr
));
int
neg
=
(
nr
<
0.0
)
?
1
:
0
;
int
neg
=
(
nr
<
0.0
)
?
1
:
0
;
uint
max_length
;
uint
max_length
;
int
exp
;
int
exp
;
...
@@ -6289,7 +6290,7 @@ int Field_str::store(double nr)
...
@@ -6289,7 +6290,7 @@ int Field_str::store(double nr)
calculate the maximum number of significant digits if the 'f'-format
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).
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
If the exponent is negative, decrease digits by the number of leading zeros
after the decimal point that do not count as significant digits.
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