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
2877b5ef
Commit
2877b5ef
authored
Jun 15, 2006
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item_cmpfunc.h, cast.result:
Post fix for bug#16377
parent
c9077f07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
mysql-test/r/cast.result
mysql-test/r/cast.result
+1
-1
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+5
-10
No files found.
mysql-test/r/cast.result
View file @
2877b5ef
...
@@ -192,7 +192,7 @@ cast("2001-1-1" as datetime) = "2001-01-01 00:00:00"
...
@@ -192,7 +192,7 @@ cast("2001-1-1" as datetime) = "2001-01-01 00:00:00"
1
1
select cast("1:2:3" as TIME) = "1:02:03";
select cast("1:2:3" as TIME) = "1:02:03";
cast("1:2:3" as TIME) = "1:02:03"
cast("1:2:3" as TIME) = "1:02:03"
1
0
select cast(NULL as DATE);
select cast(NULL as DATE);
cast(NULL as DATE)
cast(NULL as DATE)
NULL
NULL
...
...
sql/item_cmpfunc.h
View file @
2877b5ef
...
@@ -43,11 +43,8 @@ public:
...
@@ -43,11 +43,8 @@ public:
int
set_compare_func
(
Item_bool_func2
*
owner
,
Item_result
type
);
int
set_compare_func
(
Item_bool_func2
*
owner
,
Item_result
type
);
inline
int
set_compare_func
(
Item_bool_func2
*
owner_arg
)
inline
int
set_compare_func
(
Item_bool_func2
*
owner_arg
)
{
{
Item_result
ar
=
(
*
a
)
->
result_as_longlong
()
&&
(
*
b
)
->
const_item
()
?
return
set_compare_func
(
owner_arg
,
item_cmp_type
((
*
a
)
->
result_type
(),
INT_RESULT
:
(
*
a
)
->
result_type
();
(
*
b
)
->
result_type
()));
Item_result
br
=
(
*
b
)
->
result_as_longlong
()
&&
(
*
a
)
->
const_item
()
?
INT_RESULT
:
(
*
b
)
->
result_type
();
return
set_compare_func
(
owner_arg
,
item_cmp_type
(
ar
,
br
));
}
}
inline
int
set_cmp_func
(
Item_bool_func2
*
owner_arg
,
inline
int
set_cmp_func
(
Item_bool_func2
*
owner_arg
,
Item
**
a1
,
Item
**
a2
,
Item
**
a1
,
Item
**
a2
,
...
@@ -60,11 +57,9 @@ public:
...
@@ -60,11 +57,9 @@ public:
inline
int
set_cmp_func
(
Item_bool_func2
*
owner_arg
,
inline
int
set_cmp_func
(
Item_bool_func2
*
owner_arg
,
Item
**
a1
,
Item
**
a2
)
Item
**
a1
,
Item
**
a2
)
{
{
Item_result
ar
=
(
*
a1
)
->
result_as_longlong
()
&&
(
*
a2
)
->
const_item
()
?
return
set_cmp_func
(
owner_arg
,
a1
,
a2
,
INT_RESULT
:
(
*
a1
)
->
result_type
();
item_cmp_type
((
*
a1
)
->
result_type
(),
Item_result
br
=
(
*
a2
)
->
result_as_longlong
()
&&
(
*
a1
)
->
const_item
()
?
(
*
a2
)
->
result_type
()));
INT_RESULT
:
(
*
a2
)
->
result_type
();
return
set_cmp_func
(
owner_arg
,
a1
,
a2
,
item_cmp_type
(
ar
,
br
));
}
}
inline
int
compare
()
{
return
(
this
->*
func
)();
}
inline
int
compare
()
{
return
(
this
->*
func
)();
}
...
...
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