summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authorunknown <dlenev@brandersnatch.localdomain>2004-09-09 00:46:01 +0400
committerunknown <dlenev@brandersnatch.localdomain>2004-09-09 00:46:01 +0400
commit12ce293a7fc18fdc2c6f8d7ec951d816d3661cf8 (patch)
tree585d1e39d3250f0afea1d761e09394b1142c917f /sql/sp_head.h
parentcab6f8df6ddb35fbdef771eb56217bb0920be25b (diff)
downloadmariadb-git-12ce293a7fc18fdc2c6f8d7ec951d816d3661cf8.tar.gz
WL#1218 "Triggers"
After review and after merge fixes. mysql-test/t/trigger.test: After merge fix. Updated error codes. sql/sp_head.cc: After merge fix. To give some chances for functions/triggers we have to close tables during sp_instr_* execution only if we have opened them before. sql/sp_head.h: After merge fix. sp_instr constructor now takes one more argument. sql/sql_trigger.cc: After merge and review fixes. Some variable renaming and optimizations. sql/sql_yacc.yy: After merge fixes. sp_instr_* classes now require sp context as constructor parameter. Also we should be careful with adding table for which we are creating trigger to table list. Some elements in trigger body can damage LEX::query_tables and so we should add this table to list only after parsing trigger body.
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r--sql/sp_head.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h
index a253d9edcbe..f4ed3760b94 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -392,8 +392,8 @@ class sp_instr_set_user_var : public sp_instr
public:
- sp_instr_set_user_var(uint ip, LEX_STRING var, Item *val)
- : sp_instr(ip), m_set_var_item(var, val)
+ sp_instr_set_user_var(uint ip, sp_pcontext *ctx, LEX_STRING var, Item *val)
+ : sp_instr(ip, ctx), m_set_var_item(var, val)
{}
virtual ~sp_instr_set_user_var()
@@ -419,8 +419,9 @@ class sp_instr_set_trigger_field : public sp_instr
public:
- sp_instr_set_trigger_field(uint ip, LEX_STRING field_name, Item *val)
- : sp_instr(ip),
+ sp_instr_set_trigger_field(uint ip, sp_pcontext *ctx,
+ LEX_STRING field_name, Item *val)
+ : sp_instr(ip, ctx),
trigger_field(Item_trigger_field::NEW_ROW, field_name.str),
value(val)
{}