mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-19 12:56:59 +08:00
Fix potential NULL-pointer dereference.
Commit 2781b4bea7db357be59f9a5fd73ca1eb12ff5a79 arranged to defer the setup of after-trigger-related data structures, but AfterTriggerPendingOnRel didn't get the memo.
This commit is contained in:
@ -4776,7 +4776,7 @@ AfterTriggerPendingOnRel(Oid relid)
|
||||
* if TRUNCATE/etc is executed by a function or trigger within an updating
|
||||
* query on the same relation, which is pretty perverse, but let's check.
|
||||
*/
|
||||
for (depth = 0; depth <= afterTriggers.query_depth; depth++)
|
||||
for (depth = 0; depth <= afterTriggers.query_depth && depth < afterTriggers.maxquerydepth; depth++)
|
||||
{
|
||||
for_each_event_chunk(event, chunk, afterTriggers.query_stack[depth])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user