From b5f9e7ec20bd9a779ffcee7d19032a1db679c341 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 13 Sep 2005 12:50:21 +0200 Subject: Fixed BUG#13133: Local variables in stored procedures are not initialized correctly. Have to init. all local variables in their frames, not just once at the beginning of invocation. mysql-test/r/sp.result: New test case for BUG#13133. mysql-test/t/sp.test: New test case for BUG#13133. sql/sp_head.cc: Just init. local variable slots in the fram to NULL. (Real init. will be done in each block.) sql/sp_pcontext.cc: Removed isset flag, since it's not used. sql/sp_pcontext.h: Removed isset flag, since it's not used. sql/sql_yacc.yy: Initialize local variables in the block to null, or the default value, given. (Untabifed block too.) --- sql/sp_pcontext.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'sql/sp_pcontext.h') diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h index 196f9ccb24b..bd2259cb6fb 100644 --- a/sql/sp_pcontext.h +++ b/sql/sp_pcontext.h @@ -35,7 +35,6 @@ typedef struct sp_pvar enum enum_field_types type; sp_param_mode_t mode; uint offset; // Offset in current frame - my_bool isset; Item *dflt; } sp_pvar_t; @@ -147,15 +146,6 @@ class sp_pcontext : public Sql_alloc p->type= type; } - inline void - set_isset(uint i, my_bool val) - { - sp_pvar_t *p= find_pvar(i); - - if (p) - p->isset= val; - } - inline void set_default(uint i, Item *it) { -- cgit v1.2.1