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
5c815595
Commit
5c815595
authored
Oct 30, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix and test case
parent
1f7aa03e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
strings/decimal.c
strings/decimal.c
+2
-1
No files found.
strings/decimal.c
View file @
5c815595
...
@@ -206,7 +206,7 @@ int decimal2string(decimal *from, char *to, int *to_len)
...
@@ -206,7 +206,7 @@ int decimal2string(decimal *from, char *to, int *to_len)
DBUG_ASSERT
(
*
to_len
>
2
+
from
->
sign
);
DBUG_ASSERT
(
*
to_len
>
2
+
from
->
sign
);
/* removing leading zeroes */
/* removing leading zeroes */
i
=
intg
%
DIG_PER_DEC
1
;
i
=
((
intg
-
1
)
%
DIG_PER_DEC1
)
+
1
;
while
(
intg
>
0
&&
*
buf0
==
0
)
while
(
intg
>
0
&&
*
buf0
==
0
)
{
{
intg
-=
i
;
intg
-=
i
;
...
@@ -1874,6 +1874,7 @@ main()
...
@@ -1874,6 +1874,7 @@ main()
printf
(
"==== do_add ====
\n
"
);
printf
(
"==== do_add ====
\n
"
);
test_da
(
".00012345000098765"
,
"123.45"
);
test_da
(
".00012345000098765"
,
"123.45"
);
test_da
(
".1"
,
".45"
);
test_da
(
"1234500009876.5"
,
".00012345000098765"
);
test_da
(
"1234500009876.5"
,
".00012345000098765"
);
test_da
(
"9999909999999.5"
,
".555"
);
test_da
(
"9999909999999.5"
,
".555"
);
test_da
(
"99999999"
,
"1"
);
test_da
(
"99999999"
,
"1"
);
...
...
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