From 321ac4792f7bdb6452cc677872b194f5642bc5f9 Mon Sep 17 00:00:00 2001 From: dimitr Date: Mon, 2 Aug 2004 19:53:45 +0000 Subject: [PATCH] Prevent any modifications of the OLD context in triggers. --- src/jrd/cmp.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/jrd/cmp.cpp b/src/jrd/cmp.cpp index 3b3e191d26..1a364c0437 100644 --- a/src/jrd/cmp.cpp +++ b/src/jrd/cmp.cpp @@ -3640,6 +3640,15 @@ static jrd_nod* pass1(thread_db* tdbb, { ERR_post(isc_read_only_field, 0); } + else if (sub->nod_type == nod_field) + { + USHORT stream = (USHORT)(IPTR) sub->nod_arg[e_fld_stream]; + tail = &csb->csb_rpt[stream]; + if (tail->csb_flags & csb_trigger && stream == 0) // OLD context + { + ERR_post(isc_read_only_field, 0); + } + } } return node;