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
7e7d98a2
Commit
7e7d98a2
authored
Mar 04, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug #8430 (CEILING returns incorrect result)
parent
18f13a24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
sql/item_func.cc
sql/item_func.cc
+19
-7
No files found.
sql/item_func.cc
View file @
7e7d98a2
...
...
@@ -1629,13 +1629,25 @@ void Item_func_int_val::find_num_type()
longlong
Item_func_ceiling
::
int_op
()
{
/*
the volatile's for BUG #3051 to calm optimizer down (because of gcc's
bug)
*/
volatile
double
value
=
args
[
0
]
->
val_real
();
null_value
=
args
[
0
]
->
null_value
;
return
(
longlong
)
ceil
(
value
);
longlong
result
;
switch
(
args
[
0
]
->
result_type
())
{
case
INT_RESULT
:
result
=
args
[
0
]
->
val_int
();
null_value
=
args
[
0
]
->
null_value
;
break
;
case
DECIMAL_RESULT
:
{
my_decimal
dec_buf
,
*
dec
;
if
((
dec
=
decimal_op
(
&
dec_buf
)))
my_decimal2int
(
E_DEC_FATAL_ERROR
,
dec
,
unsigned_flag
,
&
result
);
else
result
=
0
;
break
;
}
default:
result
=
(
longlong
)
real_op
();
};
return
result
;
}
...
...
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