summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authordlenev@brandersnatch.localdomain <>2004-11-24 12:24:02 +0300
committerdlenev@brandersnatch.localdomain <>2004-11-24 12:24:02 +0300
commitd201074611193e42a5d36e6ba5bae908e373b5bc (patch)
treee5217019f248cb3d89f1bdfd2b0fb0aee9410520 /sql/sp_head.h
parent8c401b55696785434060c661994dd7726cd495e1 (diff)
downloadmariadb-git-d201074611193e42a5d36e6ba5bae908e373b5bc.tar.gz
Fix for bug #5888 "Triggers with nonexistent columns cause packets
out of order". (final version) Now instead of binding Item_trigger_field to TABLE objects during trigger definition parsing at table open, we perform pass through special list of all such objects in trigger. This allows easily check all references to fields in old/new version of row in trigger during execution of CREATE TRIGGER statement (this is more courtesy for users since we can't check everything anyway). We also report that such reference is bad by returning error from Item_trigger_field::fix_fields() method (instead of setup_field()) This means that if trigger is broken we will bark during trigger execution instead of trigger definition parsing at table open. (i.e. now we allow to open tables with broken triggers).
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r--sql/sp_head.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 4bfe1076f65..c4d2068661c 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -439,13 +439,9 @@ public:
virtual void print(String *str);
- bool setup_field(THD *thd, TABLE *table, enum trg_event_type event)
- {
- return trigger_field.setup_field(thd, table, event);
- }
-private:
-
Item_trigger_field trigger_field;
+
+private:
Item *value;
}; // class sp_instr_trigger_field : public sp_instr