diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-03-10 14:11:07 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-04-05 15:02:59 +0400 |
commit | 84c55a5668db582aa92dd2ccf076fbb783894b12 (patch) | |
tree | c6fccd62b326cae532b50965b37889d363111940 /sql/sp_pcontext.cc | |
parent | f429b5a834439e4f0c76e893487e33027d76b74b (diff) | |
download | mariadb-git-84c55a5668db582aa92dd2ccf076fbb783894b12.tar.gz |
MDEV-10581 sql_mode=ORACLE: Explicit cursor FOR LOOP
MDEV-12098 sql_mode=ORACLE: Implicit cursor FOR loop
Diffstat (limited to 'sql/sp_pcontext.cc')
-rw-r--r-- | sql/sp_pcontext.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc index 3a3ad0713b5..dd70c444d4e 100644 --- a/sql/sp_pcontext.cc +++ b/sql/sp_pcontext.cc @@ -621,6 +621,18 @@ const sp_pcursor *sp_pcontext::find_cursor(uint offset) const } +bool sp_pcursor::check_param_count_with_error(uint param_count) const +{ + if (param_count != (m_param_context ? + m_param_context->context_var_count() : 0)) + { + my_error(ER_WRONG_PARAMCOUNT_TO_CURSOR, MYF(0), LEX_STRING::str); + return true; + } + return false; +} + + const Spvar_definition * sp_variable::find_row_field(const LEX_STRING &var_name, const LEX_STRING &field_name, |