summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-07-27 13:00:53 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2020-07-28 08:23:57 +0200
commite08f87d527731e59931501a33fb73f5689fb6658 (patch)
tree2482a456381476a6d3297ec97a8eb419229106d9 /sql/sql_lex.cc
parentc6eb21cd878f8762b3abb12813403ed8e04fee0c (diff)
downloadmariadb-git-e08f87d527731e59931501a33fb73f5689fb6658.tar.gz
fix obvious bugs hidden by current_select assigned to builtin select
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 53e4b020ff6..f8b93abd4ae 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -6182,6 +6182,7 @@ bool LEX::sp_for_loop_cursor_declarations(THD *thd,
LEX_CSTRING name;
uint coffs, param_count= 0;
const sp_pcursor *pcursor;
+ DBUG_ENTER("LEX::sp_for_loop_cursor_declarations");
if ((item_splocal= item->get_item_splocal()))
name= item_splocal->m_name;
@@ -6213,23 +6214,23 @@ bool LEX::sp_for_loop_cursor_declarations(THD *thd,
else
{
thd->parse_error();
- return true;
+ DBUG_RETURN(true);
}
if (unlikely(!(pcursor= spcont->find_cursor_with_error(&name, &coffs,
false)) ||
pcursor->check_param_count_with_error(param_count)))
- return true;
+ DBUG_RETURN(true);
if (!(loop->m_index= sp_add_for_loop_cursor_variable(thd, index,
pcursor, coffs,
bounds.m_index,
item_func_sp)))
- return true;
+ DBUG_RETURN(true);
loop->m_target_bound= NULL;
loop->m_direction= bounds.m_direction;
loop->m_cursor_offset= coffs;
loop->m_implicit_cursor= bounds.m_implicit_cursor;
- return false;
+ DBUG_RETURN(false);
}