diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-14 11:33:35 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-14 11:33:35 +0300 |
commit | cf87f3e08c10dd7a944447ddee93fbc3827e6570 (patch) | |
tree | 3c81320e2811d99e075f7d03d3bf0d1cdfa48c84 /sql/sql_yacc.yy | |
parent | 1bf77cde5c62166c0f1652c2a1764e05ce76edb5 (diff) | |
parent | 2f7b37b02154748b223e385a7d7787900ab37b5e (diff) | |
download | mariadb-git-cf87f3e08c10dd7a944447ddee93fbc3827e6570.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index b472dfd4939..3fa54a3bf54 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -3877,9 +3877,11 @@ sp_fetch_list: LEX *lex= Lex; sp_head *sp= lex->sphead; sp_pcontext *spc= lex->spcont; - sp_variable *spv; + sp_variable *spv= likely(spc != NULL) + ? spc->find_variable(&$1, false) + : NULL; - if (unlikely(!spc || !(spv = spc->find_variable(&$1, false)))) + if (unlikely(!spv)) my_yyabort_error((ER_SP_UNDECLARED_VAR, MYF(0), $1.str)); /* An SP local variable */ @@ -3891,9 +3893,11 @@ sp_fetch_list: LEX *lex= Lex; sp_head *sp= lex->sphead; sp_pcontext *spc= lex->spcont; - sp_variable *spv; + sp_variable *spv= likely(spc != NULL) + ? spc->find_variable(&$3, false) + : NULL; - if (unlikely(!spc || !(spv = spc->find_variable(&$3, false)))) + if (unlikely(!spv)) my_yyabort_error((ER_SP_UNDECLARED_VAR, MYF(0), $3.str)); /* An SP local variable */ |