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
48ff0f4c
Commit
48ff0f4c
authored
Feb 16, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix - to not to call val_xxx in Item_func_interval twice
parent
0a96ef4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+12
-3
No files found.
sql/item_cmpfunc.cc
View file @
48ff0f4c
...
...
@@ -895,15 +895,24 @@ void Item_func_interval::fix_length_and_dec()
longlong
Item_func_interval
::
val_int
()
{
DBUG_ASSERT
(
fixed
==
1
);
double
value
=
row
->
el
(
0
)
->
val_real
()
;
double
value
;
my_decimal
dec_buf
,
*
dec
=
NULL
;
uint
i
;
if
(
use_decimal_comparison
)
{
dec
=
row
->
el
(
0
)
->
val_decimal
(
&
dec_buf
);
if
(
row
->
el
(
0
)
->
null_value
)
return
-
1
;
my_decimal2double
(
E_DEC_FATAL_ERROR
,
dec
,
&
value
);
}
else
{
value
=
row
->
el
(
0
)
->
val_real
();
if
(
row
->
el
(
0
)
->
null_value
)
return
-
1
;
}
if
(
row
->
el
(
0
)
->
null_value
)
return
-
1
;
// -1 if null
if
(
intervals
)
{
// Use binary search to find interval
uint
start
,
end
;
...
...
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