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
52b3d95f
Commit
52b3d95f
authored
Nov 20, 2014
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deriving Item_bool_func from Item_bool_func2.
parent
969f4918
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+3
-5
No files found.
sql/item_cmpfunc.h
View file @
52b3d95f
...
@@ -364,7 +364,7 @@ class Le_creator :public Comp_creator
...
@@ -364,7 +364,7 @@ class Le_creator :public Comp_creator
virtual
bool
l_op
()
const
{
return
1
;
}
virtual
bool
l_op
()
const
{
return
1
;
}
};
};
class
Item_bool_func2
:
public
Item_
int
_func
class
Item_bool_func2
:
public
Item_
bool
_func
{
/* Bool with 2 string args */
{
/* Bool with 2 string args */
protected:
protected:
Arg_comparator
cmp
;
Arg_comparator
cmp
;
...
@@ -372,7 +372,7 @@ class Item_bool_func2 :public Item_int_func
...
@@ -372,7 +372,7 @@ class Item_bool_func2 :public Item_int_func
public:
public:
Item_bool_func2
(
Item
*
a
,
Item
*
b
)
Item_bool_func2
(
Item
*
a
,
Item
*
b
)
:
Item_
int
_func
(
a
,
b
),
cmp
(
tmp_arg
,
tmp_arg
+
1
),
:
Item_
bool
_func
(
a
,
b
),
cmp
(
tmp_arg
,
tmp_arg
+
1
),
abort_on_null
(
FALSE
)
{
sargable
=
TRUE
;
}
abort_on_null
(
FALSE
)
{
sargable
=
TRUE
;
}
void
fix_length_and_dec
();
void
fix_length_and_dec
();
int
set_cmp_func
()
int
set_cmp_func
()
...
@@ -389,14 +389,12 @@ class Item_bool_func2 :public Item_int_func
...
@@ -389,14 +389,12 @@ class Item_bool_func2 :public Item_int_func
}
}
bool
is_null
()
{
return
MY_TEST
(
args
[
0
]
->
is_null
()
||
args
[
1
]
->
is_null
());
}
bool
is_null
()
{
return
MY_TEST
(
args
[
0
]
->
is_null
()
||
args
[
1
]
->
is_null
());
}
bool
is_bool_func
()
{
return
1
;
}
CHARSET_INFO
*
compare_collation
()
{
return
cmp
.
cmp_collation
.
collation
;
}
CHARSET_INFO
*
compare_collation
()
{
return
cmp
.
cmp_collation
.
collation
;
}
uint
decimal_precision
()
const
{
return
1
;
}
void
top_level_item
()
{
abort_on_null
=
TRUE
;
}
void
top_level_item
()
{
abort_on_null
=
TRUE
;
}
Arg_comparator
*
get_comparator
()
{
return
&
cmp
;
}
Arg_comparator
*
get_comparator
()
{
return
&
cmp
;
}
void
cleanup
()
void
cleanup
()
{
{
Item_
int
_func
::
cleanup
();
Item_
bool
_func
::
cleanup
();
cmp
.
cleanup
();
cmp
.
cleanup
();
}
}
...
...
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