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
104771de
Commit
104771de
authored
Oct 08, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decimal: *correct* implementation of ROUND_UP at last
parent
c1a4f0c5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
mysql-test/r/type_newdecimal.result
mysql-test/r/type_newdecimal.result
+3
-0
mysql-test/t/type_newdecimal.test
mysql-test/t/type_newdecimal.test
+2
-0
strings/decimal.c
strings/decimal.c
+1
-1
No files found.
mysql-test/r/type_newdecimal.result
View file @
104771de
...
...
@@ -1994,3 +1994,6 @@ select 0.000000000000000000000000000000000000000000000000001 mod 1;
select 0.0000000001 mod 1;
0.0000000001 mod 1
0.0000000001
select 0.01 mod 1;
0.01 mod 1
0.01
mysql-test/t/type_newdecimal.test
View file @
104771de
...
...
@@ -1579,3 +1579,5 @@ select 0.000000000000000000000000000000000000000000000000001 mod 1;
# incorrect result
#
select
0.0000000001
mod
1
;
select
0.01
mod
1
;
strings/decimal.c
View file @
104771de
...
...
@@ -137,7 +137,7 @@ static const dec1 frac_max[DIG_PER_DEC1-1]={
static
inline
int
ROUND_UP
(
int
x
)
{
return
(
x
+
(
x
>
0
?
1
:
-
1
)
*
(
DIG_PER_DEC1
-
1
))
/
DIG_PER_DEC1
;
return
(
x
+
(
x
>
0
?
DIG_PER_DEC1
-
1
:
0
))
/
DIG_PER_DEC1
;
}
#ifdef HAVE_valgrind
...
...
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