mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
WL#1218 "Triggers". Some very preliminary version of patch.
Mostly needed for Monty for him getting notion what needed for triggers from new .FRM format. Things to be done: - Right placement of trigger's invocations - Right handling of errors in triggers (including transaction rollback) - Support for priviliges - Right handling of DROP/RENAME table (hope that it will be handled automatically with merging of .TRG into .FRM file) - Saving/restoring some information critical for trigger creation and replication with their definitions (e.g. sql_mode, creator, ...) - Replication Already has some known bugs so probably not for general review.
This commit is contained in:
@ -24,6 +24,12 @@
|
||||
#include "sp.h"
|
||||
#include "sp_head.h"
|
||||
|
||||
/*
|
||||
We are using pointer to this variable for distinguishing between assignment
|
||||
to NEW row field (when parsing trigger definition) and structured variable.
|
||||
*/
|
||||
sys_var_long_ptr trg_new_row_fake_var(0, 0);
|
||||
|
||||
/* Macros to look like lex */
|
||||
|
||||
#define yyGet() *(lex->ptr++)
|
||||
@ -130,6 +136,7 @@ LEX *lex_start(THD *thd, uchar *buf,uint length)
|
||||
lex->duplicates= DUP_ERROR;
|
||||
lex->sphead= NULL;
|
||||
lex->spcont= NULL;
|
||||
lex->trg_table= NULL;
|
||||
|
||||
extern byte *sp_lex_spfuns_key(const byte *ptr, uint *plen, my_bool first);
|
||||
hash_free(&lex->spfuns);
|
||||
|
Reference in New Issue
Block a user