summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_trigger.h')
-rw-r--r--sql/sql_trigger.h51
1 files changed, 2 insertions, 49 deletions
diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h
index e2ed4bcc0f4..d9b39cc3034 100644
--- a/sql/sql_trigger.h
+++ b/sql/sql_trigger.h
@@ -20,6 +20,7 @@
QQ: Will it be merged into TABLE in future ?
*/
+
class Table_triggers_list: public Sql_alloc
{
/* Triggers as SPs grouped by event, action_time */
@@ -76,55 +77,7 @@ public:
bool drop_trigger(THD *thd, TABLE_LIST *table);
bool process_triggers(THD *thd, trg_event_type event,
trg_action_time_type time_type,
- bool old_row_is_record1)
- {
- int res= 0;
-
- if (bodies[event][time_type])
- {
- bool save_in_sub_stmt= thd->in_sub_stmt;
-#ifndef EMBEDDED_LIBRARY
- /* Surpress OK packets in case if we will execute statements */
- my_bool nsok= thd->net.no_send_ok;
- thd->net.no_send_ok= TRUE;
-#endif
-
- if (old_row_is_record1)
- {
- old_field= record1_field;
- new_field= table->field;
- }
- else
- {
- new_field= record1_field;
- old_field= table->field;
- }
-
- /*
- FIXME: We should juggle with security context here (because trigger
- should be invoked with creator rights).
- */
- /*
- We disable binlogging, as in SP/functions, even though currently
- triggers can't do updates. When triggers can do updates, someone
- should add such a trigger to rpl_sp.test to verify that the update
- does NOT go into binlog.
- */
- tmp_disable_binlog(thd);
- thd->in_sub_stmt= TRUE;
-
- res= bodies[event][time_type]->execute_function(thd, 0, 0, 0);
-
- thd->in_sub_stmt= save_in_sub_stmt;
- reenable_binlog(thd);
-
-#ifndef EMBEDDED_LIBRARY
- thd->net.no_send_ok= nsok;
-#endif
- }
-
- return res;
- }
+ bool old_row_is_record1);
bool get_trigger_info(THD *thd, trg_event_type event,
trg_action_time_type time_type,
LEX_STRING *trigger_name, LEX_STRING *trigger_stmt,