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
278f7fdd
Commit
278f7fdd
authored
Aug 19, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: get rid of (Item_splocal*)item downcast
parent
932100c8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
sql/item.h
sql/item.h
+4
-3
sql/sp_head.cc
sql/sp_head.cc
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-2
No files found.
sql/item.h
View file @
278f7fdd
...
...
@@ -570,6 +570,7 @@ class COND_EQUAL;
class
st_select_lex_unit
;
class
Item_func_not
;
class
Item_splocal
;
class
Item
{
Item
(
const
Item
&
);
/* Prevent use of these */
...
...
@@ -1431,7 +1432,7 @@ public:
delete
this
;
}
virtual
bool
is_splocal
()
{
return
0
;
}
/* Needed for error checking */
virtual
Item_splocal
*
get_item_splocal
()
{
return
0
;
}
/*
Return Settable_routine_parameter interface of the Item. Return 0
...
...
@@ -1729,8 +1730,6 @@ public:
enum_field_types
sp_var_type
,
uint
pos_in_q
=
0
,
uint
len_in_q
=
0
);
bool
is_splocal
()
{
return
1
;
}
/* Needed for error checking */
Item
*
this_item
();
const
Item
*
this_item
()
const
;
Item
**
this_item_addr
(
THD
*
thd
,
Item
**
);
...
...
@@ -1750,6 +1749,8 @@ private:
bool
set_value
(
THD
*
thd
,
sp_rcontext
*
ctx
,
Item
**
it
);
public:
Item_splocal
*
get_item_splocal
()
{
return
this
;
}
Settable_routine_parameter
*
get_settable_routine_parameter
()
{
return
this
;
...
...
sql/sp_head.cc
View file @
278f7fdd
...
...
@@ -985,9 +985,9 @@ subst_spvars(THD *thd, sp_instr *instr, LEX_STRING *query_str)
/* Find all instances of Item_splocal used in this statement */
for
(
Item
*
item
=
instr
->
free_list
;
item
;
item
=
item
->
next
)
{
if
(
item
->
is_splocal
())
Item_splocal
*
item_spl
=
item
->
get_item_splocal
();
if
(
item_spl
)
{
Item_splocal
*
item_spl
=
(
Item_splocal
*
)
item
;
if
(
item_spl
->
pos_in_query
)
sp_vars_uses
.
append
(
item_spl
);
}
...
...
sql/sql_parse.cc
View file @
278f7fdd
...
...
@@ -3189,7 +3189,7 @@ mysql_execute_command(THD *thd)
/* Count SP local vars in the top-level SELECT list */
while
((
item
=
it
++
))
{
if
(
item
->
is
_splocal
())
if
(
item
->
get_item
_splocal
())
splocal_refs
++
;
}
/*
...
...
sql/sql_yacc.yy
View file @
278f7fdd
...
...
@@ -9230,9 +9230,9 @@ simple_expr:
}
| DEFAULT '(' simple_ident ')'
{
if ($3->is_splocal())
Item_splocal *il= $3->get_item_splocal();
if (il)
{
Item_splocal *il= static_cast<Item_splocal *>($3);
my_error(ER_WRONG_COLUMN_NAME, MYF(0), il->my_name()->str);
MYSQL_YYABORT;
...
...
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