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
3b932255
Commit
3b932255
authored
Jan 16, 2023
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: const_Item->real_item()
allow real_item() to be called for const Item*, remove casts in the code
parent
cce76fef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
sql/item.cc
sql/item.cc
+1
-1
sql/item.h
sql/item.h
+4
-3
No files found.
sql/item.cc
View file @
3b932255
...
...
@@ -3444,7 +3444,7 @@ bool Item_field::is_null_result()
bool
Item_field
::
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
{
Item
*
real_item2
=
((
Item
*
)
item
)
->
real_item
();
const
Item
*
real_item2
=
item
->
real_item
();
if
(
real_item2
->
type
()
!=
FIELD_ITEM
)
return
0
;
...
...
sql/item.h
View file @
3b932255
...
...
@@ -1891,6 +1891,7 @@ class Item: public Value_source,
virtual
Item
*
copy_or_same
(
THD
*
thd
)
{
return
this
;
}
virtual
Item
*
copy_andor_structure
(
THD
*
thd
)
{
return
this
;
}
virtual
Item
*
real_item
()
{
return
this
;
}
const
Item
*
real_item
()
const
{
return
const_cast
<
Item
*>
(
this
)
->
real_item
();
}
virtual
Item
*
get_tmp_table_item
(
THD
*
thd
)
{
return
copy_or_same
(
thd
);
}
virtual
Item
*
make_odbc_literal
(
THD
*
thd
,
const
LEX_CSTRING
*
typestr
)
{
...
...
@@ -5404,7 +5405,7 @@ class Item_ref :public Item_ident,
{
return
ref
?
(
*
ref
)
->
type
()
:
REF_ITEM
;
}
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
override
{
Item
*
it
=
((
Item
*
)
item
)
->
real_item
();
const
Item
*
it
=
item
->
real_item
();
return
ref
&&
(
*
ref
)
->
eq
(
it
,
binary_cmp
);
}
void
save_val
(
Field
*
to
)
override
;
...
...
@@ -5762,7 +5763,7 @@ class Item_cache_wrapper :public Item_result_field,
{
orig_item
->
make_send_field
(
thd
,
field
);
}
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
override
{
Item
*
it
=
const_cast
<
Item
*>
(
item
)
->
real_item
();
const
Item
*
it
=
item
->
real_item
();
return
orig_item
->
eq
(
it
,
binary_cmp
);
}
void
fix_after_pullout
(
st_select_lex
*
new_parent
,
Item
**
refptr
,
bool
merge
)
...
...
@@ -7638,7 +7639,7 @@ class Item_direct_ref_to_item : public Item_direct_ref
{
m_item
->
make_send_field
(
thd
,
field
);
}
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
{
Item
*
it
=
((
Item
*
)
item
)
->
real_item
();
const
Item
*
it
=
item
->
real_item
();
return
m_item
->
eq
(
it
,
binary_cmp
);
}
void
fix_after_pullout
(
st_select_lex
*
new_parent
,
Item
**
refptr
,
bool
merge
)
...
...
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