diff options
author | dlenev@brandersnatch.localdomain <> | 2005-03-04 16:35:28 +0300 |
---|---|---|
committer | dlenev@brandersnatch.localdomain <> | 2005-03-04 16:35:28 +0300 |
commit | 5a6c7027f070aaa634051870d88bc185fed70878 (patch) | |
tree | b4e76c9e63193526fe9a7fecdf02c5a44fe5c270 /sql/sql_trigger.h | |
parent | 6611d3d2f8ea02886c4b507b7d15f5c3773431cc (diff) | |
download | mariadb-git-5a6c7027f070aaa634051870d88bc185fed70878.tar.gz |
Better approach for prelocking of tables for stored routines execution
and some SP-related cleanups.
- We don't have separate stage for calculation of list of tables
to be prelocked and doing implicit LOCK/UNLOCK any more.
Instead we calculate this list at open_tables() and do implicit
LOCK in lock_tables() (and UNLOCK in close_thread_tables()).
Also now we support cases when same table (with same alias) is
used several times in the same query in SP.
- Cleaned up execution of SP. Moved all common code which handles
LEX and does preparations before statement execution or complex
expression evaluation to auxilary sp_lex_keeper class. Now
all statements in SP (and corresponding instructions) that
evaluate expression which can contain subquery have their
own LEX.
Diffstat (limited to 'sql/sql_trigger.h')
-rw-r--r-- | sql/sql_trigger.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h index 82e7c1ce023..7dd6734eb89 100644 --- a/sql/sql_trigger.h +++ b/sql/sql_trigger.h @@ -42,14 +42,21 @@ public: if (bodies[event][time_type]) { - /* - Similar to function invocation we don't need to surpress sending of - ok packets here because don't allow execute statements from trigger. +#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 + /* FIXME: We should juggle with security context here (because trigger should be invoked with creator rights). */ res= bodies[event][time_type]->execute_function(thd, 0, 0, 0); + +#ifndef EMBEDDED_LIBRARY + thd->net.no_send_ok= nsok; +#endif } return res; |