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
3d59f12a
Commit
3d59f12a
authored
Nov 07, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't return intg=frac=0 from mod
parent
c9292b82
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
strings/decimal.c
strings/decimal.c
+6
-1
No files found.
strings/decimal.c
View file @
3d59f12a
...
...
@@ -206,7 +206,7 @@ int decimal2string(decimal *from, char *to, int *to_len)
char
*
s
=
to
;
dec1
*
buf
,
*
buf0
=
from
->
buf
,
tmp
;
DBUG_ASSERT
(
*
to_len
>
2
+
from
->
sign
);
DBUG_ASSERT
(
*
to_len
>
=
2
+
from
->
sign
);
/* removing leading zeroes */
i
=
((
intg
-
1
)
%
DIG_PER_DEC1
)
+
1
;
...
...
@@ -1511,6 +1511,11 @@ static int do_div_mod(decimal *from1, decimal *from2,
intg0
=
ROUND_UP
(
prec1
-
frac1
)
-
(
start1
-
tmp1
);
frac0
=
ROUND_UP
(
to
->
frac
);
error
=
E_DEC_OK
;
if
(
unlikely
(
frac0
==
0
&&
intg0
==
0
))
{
decimal_make_zero
(
to
);
goto
done
;
}
if
(
intg0
<=
0
)
{
if
(
unlikely
(
-
intg0
>=
to
->
len
))
...
...
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