Disallow empty triggers. Ticket #3283. This does not present a backwards
compatibility problem because prior to this change, an empty trigger would segfault. (CVS 5550) FossilOrigin-Name: 571adab9d2215fac6ed375257a070b8ffa9d9808
This commit is contained in:
parent
bc10377a40
commit
812389666c
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Move\sa\svariable\sinitialization\searlier\sto\swork\saround\sMS\scompiler\scomplaints.\s(CVS\s5549)
|
||||
D 2008-08-08T18:06:26
|
||||
C Disallow\sempty\striggers.\s\sTicket\s#3283.\s\sThis\sdoes\snot\spresent\sa\sbackwards\ncompatibility\sproblem\sbecause\sprior\sto\sthis\schange,\san\sempty\strigger\swould\nsegfault.\s(CVS\s5550)
|
||||
D 2008-08-11T14:26:35
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in 2713ea64947be3b35f35d9a3158bb8299c90b019
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -137,7 +137,7 @@ F src/os_unix.c fe0dbc35bcd3de49e46b132abfc0f45d6dd6a864
|
||||
F src/os_win.c aefe9ee26430678a19a058a874e4e2bd91398142
|
||||
F src/pager.c b6a366f2343e7f127d7e70dbe76cd664336143cd
|
||||
F src/pager.h 588c1ac195228b2da45c4e5f7ab6c2fd253d1751
|
||||
F src/parse.y 95d377a7c8714d4b68085709482c4220dc3cd778
|
||||
F src/parse.y 84003422b2862f82bd187dfa2399557fd1f4ecbe
|
||||
F src/pragma.c 6e207b4f69901089758c02c02e0bf86ed12a4d8f
|
||||
F src/prepare.c d9f420808f7d2802258f0bf64103271311e2d87f
|
||||
F src/printf.c 2e984b2507291a7e16d89dc9bb60582904f6247d
|
||||
@ -617,7 +617,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P efcaeb68f943daf135972ae045eff1ca157a7f22
|
||||
R e14809ad0728bff4f7c2887a2141af1a
|
||||
P 02232e71441efc75e0729423f635ce21809fe412
|
||||
R a0421b2c8349a6019a5300ef437072f5
|
||||
U drh
|
||||
Z 5658ff2ac52b1890bd0a4bac033e7421
|
||||
Z b2ec72f356e4a51de4e29f9ee664e69c
|
||||
|
@ -1 +1 @@
|
||||
02232e71441efc75e0729423f635ce21809fe412
|
||||
571adab9d2215fac6ed375257a070b8ffa9d9808
|
13
src/parse.y
13
src/parse.y
@ -14,7 +14,7 @@
|
||||
** the parser. Lemon will also generate a header file containing
|
||||
** numeric codes for all of the tokens.
|
||||
**
|
||||
** @(#) $Id: parse.y,v 1.250 2008/08/08 15:06:22 drh Exp $
|
||||
** @(#) $Id: parse.y,v 1.251 2008/08/11 14:26:35 drh Exp $
|
||||
*/
|
||||
|
||||
// All token codes are small integers with #defines that begin with "TK_"
|
||||
@ -990,15 +990,24 @@ when_clause(A) ::= WHEN expr(X). { A = X; }
|
||||
%type trigger_cmd_list {TriggerStep*}
|
||||
%destructor trigger_cmd_list {sqlite3DeleteTriggerStep(pParse->db, $$);}
|
||||
trigger_cmd_list(A) ::= trigger_cmd_list(Y) trigger_cmd(X) SEMI. {
|
||||
/*
|
||||
if( Y ){
|
||||
Y->pLast->pNext = X;
|
||||
}else{
|
||||
Y = X;
|
||||
}
|
||||
*/
|
||||
assert( Y!=0 );
|
||||
Y->pLast->pNext = X;
|
||||
Y->pLast = X;
|
||||
A = Y;
|
||||
}
|
||||
trigger_cmd_list(A) ::= . { A = 0; }
|
||||
trigger_cmd_list(A) ::= trigger_cmd(X) SEMI. {
|
||||
/* if( X ) */
|
||||
assert( X!=0 );
|
||||
X->pLast = X;
|
||||
A = X;
|
||||
}
|
||||
|
||||
%type trigger_cmd {TriggerStep*}
|
||||
%destructor trigger_cmd {sqlite3DeleteTriggerStep(pParse->db, $$);}
|
||||
|
Loading…
Reference in New Issue
Block a user