diff options
author | pem@mysql.com <> | 2005-11-22 16:01:04 +0100 |
---|---|---|
committer | pem@mysql.com <> | 2005-11-22 16:01:04 +0100 |
commit | 7827fec43e6ce7b213c3049c62b2077e8345149a (patch) | |
tree | 6656fabfa8d3c846cb6d30b36f91e9d1f5a142bc | |
parent | 6c2f6e29b96bb7089278206ee796eb6862d70065 (diff) | |
download | mariadb-git-7827fec43e6ce7b213c3049c62b2077e8345149a.tar.gz |
Set type and default correctly for local SP variables during parsing.
-rw-r--r-- | sql/sql_yacc.yy | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 76cd19dd741..8c7bcc31689 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1605,13 +1605,14 @@ sp_decl: for (uint i = max-$2 ; i < max ; i++) { sp_instr_set *in; + uint off= ctx->pvar_context2index(i); - ctx->set_type(i, type); + ctx->set_type(off, type); if (! has_default) it= new Item_null(); /* QQ Set to the type with null_value? */ in = new sp_instr_set(lex->sphead->instructions(), ctx, - ctx->pvar_context2index(i), + off, it, type, lex, (i == max - 1)); @@ -1620,7 +1621,7 @@ sp_decl: freeing LEX. */ lex->sphead->add_instr(in); - ctx->set_default(i, it); + ctx->set_default(off, it); } lex->sphead->restore_lex(YYTHD); $$.vars= $2; |