<commit_before># Test case 1 : Trying mupip trigger -select using a prior version, with a multi-line trigger created with current version
Files Created in ##TEST_PATH##:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
mumps.dat
# Trying "" as line terminator in multi-line trigger
Error : Multi-line xecute in $ztrigger ITEM must end in newline
0
# Try $ztrigger("select")
1
# Backup the database, to be used by prior version later
# Delete all triggers
No matching triggers found for deletion
1
-----------------------------------------------------------------------
# Trying $C(0) as line terminator in multi-line trigger
Error : Multi-line xecute in $ztrigger ITEM must end in newline
0
# Try $ztrigger("select")
1
# Backup the database, to be used by prior version later
# Delete all triggers
No matching triggers found for deletion
1
-----------------------------------------------------------------------
# Trying $C(10) as line terminator in multi-line trigger
Added SET trigger on ^a named a#1
1
# Try $ztrigger("select")
;trigger name: a#1 (region DEFAULT)  cycle: 1
+^a -commands=S -xecute=<<
 write 1,!
 write 2,!
>>
1
# Backup the database, to be used by prior version later
# Delete all triggers
All existing triggers (count = 1) deleted
1
-----------------------------------------------------------------------
# Trying $C(13) as line terminator in multi-line trigger
Error : Multi-line xecute in $ztrigger ITEM must end in newline
0
# Try $ztrigger("select")
1
# Backup the database, to be used by prior version later
# Delete all triggers
No matching triggers found for deletion
1
-----------------------------------------------------------------------
##SUSPEND_OUTPUT NONUNICODE_MODE
# Trying "ÿ" as line terminator in multi-line trigger
##ALLOW_OUTPUT NONUNICODE_MODE
##SUSPEND_OUTPUT UNICODE_MODE
# Trying $C(255) as line terminator in multi-line trigger
##ALLOW_OUTPUT UNICODE_MODE
Error : Multi-line xecute in $ztrigger ITEM must end in newline
0
# Try $ztrigger("select")
1
# Backup the database, to be used by prior version later
# Delete all triggers
No matching triggers found for deletion
1
-----------------------------------------------------------------------
# Test some valid and invalid multi-line commands with $c(10)
	>>
	^-----
##TEST_AWK		At column 0, line 3, source module .*
%GTM-E-LSEXPECTED, A line separator is expected here
Error : Parsing XECUTE string: " if ($incr(a)) write a,!"_$C(10)_" write ^a21,!"_$C(10)_">>"_$C(10)
0
Added SET trigger on ^a22 named a22#1
1
Added SET trigger on ^a3 named a3#1
1
Added SET trigger on ^a4 named a4#1
1
%GTM-E-LABELMISSING, Label referenced but not defined: trigwork
##TEST_AWK%GTM-I-SRCNAM, in source module .*
Error : Parsing XECUTE string: " do trigwork()"_$C(10)_" write 2,!"_$C(10)
0
	 w $gtm()
	    ^-----
##TEST_AWK		At column 5, line 1, source module .*
%GTM-E-INVFCN, Invalid function name
Error : Parsing XECUTE string: " w $gtm()"_$C(10)_" write 2,!"_$C(10)
0
# Trying mumps1.dat (multi-line trigger created with current version) with prior version trigger select
Output File: 
------------------------------------------------------------------------------------
# Trying mumps2.dat (multi-line trigger created with current version) with prior version trigger select
Output File: 
------------------------------------------------------------------------------------
# Trying mumps3.dat (multi-line trigger created with current version) with prior version trigger select
Output File: 
;trigger name: a#1#  cycle: 1
+^a -commands=S -xecute=<<
 write 1,!
 write 2,!
>>
------------------------------------------------------------------------------------
# Trying mumps4.dat (multi-line trigger created with current version) with prior version trigger select
Output File: 
------------------------------------------------------------------------------------
# Trying mumps5.dat (multi-line trigger created with current version) with prior version trigger select
Output File: 
------------------------------------------------------------------------------------
# Test case 5: While deleting triggers do not consider $c(10) as part of trigger
# Since the below two operations do not touch the db, just reuse the db of the current test case
# Expect Newline not allowed and not Invalid trigger for both the ztrigger calls below
Error : Newline not allowed in trigger name for delete operation
0
Error : Newline not allowed in trigger name for delete operation
0
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
# Test case 2 : Doing a trigger select when the XECUTE string in the ^#t global is corrupted such that the last newline is instead some other character
# should not SIG-11(pro) or assert fail(dbg)
Files Created in ##TEST_PATH##:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
mumps.dat
# Install the multiline trigger
File testcase2.trg, Line 1: Added SET trigger on ^a named abcd
=========================================
1 triggers added
0 triggers deleted
0 triggers modified
1 trigger file entries did update database trigger content
0 trigger file entries did not update database trigger content
=========================================
1
# Corrupt the last byte of the multi-line trigger with a byte randomly chosen from $c(0) thru $c(255)

File  	##TEST_PATH##/mumps.dat
Region	DEFAULT

# do mupip trigger -select and expect it to work
Output File: 
;trigger name: abcd (region DEFAULT)  cycle: 1
+^a -name=abcd -commands=S -xecute=<<
 do ^twork1
##TEST_AWK do \^twork2.
>>
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
# Test case 3a : while doing a wildcard trig deletion,
# a TLGTRIG record should be written to only one journaled region
Files Created in ##TEST_PATH##:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
a.dat
b.dat
c.dat
mumps.dat
Files Created in ##FILTERED##_REMOTE_TEST_PATH_/instance2:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
a.dat
b.dat
c.dat
mumps.dat
==Executing MULTISITE_REPLIC 'START INST1 INST2'==
Starting Primary Source Server in ##TEST_PATH##
Starting Passive Source Server and Receiver Server in ##FILTERED##_REMOTE_TEST_PATH_/instance2
# Install triggers in regions AREG And BREG
File testcase3.trg, Line 1: Added SET trigger on ^aglobal named aglobal#1
File testcase3.trg, Line 2: Added SET trigger on ^bcolon named atrigger2
=========================================
2 triggers added
0 triggers deleted
0 triggers modified
2 trigger file entries did update database trigger content
0 trigger file entries did not update database trigger content
=========================================
# Delete all triggers with -*
All existing triggers (count = 2) deleted
1
a.mjf
TLGTRIG/"+^aglobal   -commands=set -xecute=""do ^twork"""
USET   /8/^#t("#TNAME","aglobal","#SEQNUM")="1"
USET   /8/^#t("#TNAME","aglobal","#TNCOUNT")="1"
USET   /8/^#t("#TNAME","aglobal#1")="aglobal"_$C(0)_"1"
USET   /8/^#t("aglobal","#COUNT")="1"
USET   /8/^#t("aglobal",1,"TRIGNAME")="aglobal#1#"
USET   /8/^#t("aglobal",1,"CMD")="S"
USET   /8/^#t("aglobal",1,"XECUTE")=" do ^twork"
USET   /8/^#t("aglobal","#CYCLE")="1"
TKILL  /0/^#t("#TNAME")
ULGTRIG/"-*"
UKILL  /0/^#t("aglobal")
USET   /0/^#t("aglobal","#CYCLE")="2"
-------------------------------------------------------------
b.mjf
TLGTRIG/"+^bcolon(:) -commands=set -xecute=""do ^twork"" -name=atrigger2"
USET   /8/^#t("#TNAME","atrigger2")="bcolon"_$C(0)_"1"
USET   /8/^#t("bcolon","#COUNT")="1"
USET   /8/^#t("bcolon",1,"TRIGNAME")="atrigger2#"
USET   /8/^#t("bcolon",1,"GVSUBS")="*"
USET   /8/^#t("bcolon",1,"CMD")="S"
USET   /8/^#t("bcolon",1,"XECUTE")=" do ^twork"
USET   /8/^#t("bcolon","#CYCLE")="1"
TKILL  /0/^#t("#TNAME")
UKILL  /0/^#t("bcolon")
USET   /0/^#t("bcolon","#CYCLE")="2"
-------------------------------------------------------------
c.mjf
-------------------------------------------------------------
mumps.mjf
-------------------------------------------------------------
==Executing MULTISITE_REPLIC 'SYNC ALL_LINKS'==
==Executing MULTISITE_REPLIC 'STOP ALL_LINKS OFF'==
==Executing MULTISITE_REPLIC 'EXTRACT ALL'==
DATABASE EXTRACT PASSED
==Executing MULTISITE_REPLIC 'RUN INST1 $gtm_tst/com/dbcheck_base.csh '==
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
==Executing MULTISITE_REPLIC 'RUN INST2 $gtm_tst/com/dbcheck_base.csh '==
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
==Executing MULTISITE_REPLIC 'RUN INST2 $gtm_tst/com/backup_dbjnl.csh testcase3a "*.dat *.gld *.mjl* *.mjf" "mv"'==
# Test case 3b : For a wildcard trigger deletion, if none of the trigger participating regions are journaled
# TLGTRIG should NOT be written to a non-participating region
Files Created in ##TEST_PATH##:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
a.dat
b.dat
c.dat
mumps.dat
# Install triggers in regions AREG And BREG
File testcase3.trg, Line 1: Added SET trigger on ^aglobal named aglobal#1
File testcase3.trg, Line 2: Added SET trigger on ^bcolon named atrigger2
=========================================
2 triggers added
0 triggers deleted
0 triggers modified
2 trigger file entries did update database trigger content
0 trigger file entries did not update database trigger content
=========================================
# Wildcard trigger delete with -a*
Deleted trigger named 'aglobal#1' for global ^aglobal (region AREG)
Deleted trigger named 'atrigger2' for global ^bcolon (region BREG)
All existing triggers named a* (count = 2) now deleted
1
c.mjf
TLGTRIG/"-a*"
-------------------------------------------------------------
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
# Test case 4 : Replication with multiline and large triggers
Files Created in ##TEST_PATH##:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
a.dat
mumps.dat
==Executing MULTISITE_REPLIC 'RUN INST2 ##TEST_COM_PATH##/dbcreate_base.csh mumps 2 -record_size=512 -glob=65536'==
Files Created in ##FILTERED##_REMOTE_TEST_PATH_/instance2:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
a.dat
mumps.dat
==Executing MULTISITE_REPLIC 'START INST1 INST2'==
Starting Primary Source Server in ##TEST_PATH##
Starting Passive Source Server and Receiver Server in ##FILTERED##_REMOTE_TEST_PATH_/instance2
==Executing MULTISITE_REPLIC 'RUN INST2 $gtm_exe/mumps -run sectrig^gtm7509'==
Added SET trigger on ^SAMPLE named SAMPLE#1
Added SET trigger on ^SAMPLE named SAMPLE#2
Added SET trigger on ^SAMPLE named SAMPLE#3
==Executing MULTISITE_REPLIC 'SYNC INST1 INST2'==
Added SET trigger on ^SAMPLE named SAMPLE#1
Added SET trigger on ^SAMPLE named SAMPLE#2
Added SET trigger on ^SAMPLE named SAMPLE#3
File multiline8191.trg, Line 1: Added SET trigger on ^MULTILINE named MULTILINE#1
=========================================
1 triggers added
0 triggers deleted
0 triggers modified
1 trigger file entries did update database trigger content
0 trigger file entries did not update database trigger content
=========================================
==Executing MULTISITE_REPLIC 'SYNC INST1 INST2'==
==Executing MULTISITE_REPLIC 'SYNC INST1 INST2'==
==Executing MULTISITE_REPLIC 'STOP INST1 INST2'==
Shutting down Passive Source Server and Receiver Server in ##FILTERED##_REMOTE_TEST_PATH_/instance2
Shutting down Primary Source Server Server in ##TEST_PATH##
# ^SAMPLE and ^count in primary journal files
TSET   /6/^SAMPLE(-3)="-3"
TSET   /6/^SAMPLE(-2)="-2"
TSET   /6/^SAMPLE(-1)="-1"
TSET   /6/^SAMPLE(0)="0"
TSET   /6/^SAMPLE(1)="1"
USET   /1/^count="1"
TSET   /6/^SAMPLE(2)="2"
USET   /1/^count="2"
TSET   /6/^SAMPLE(3)="3"
USET   /1/^count="3"
# ^SAMPLE and ^count in secondary journal files
TSET   /6/^SAMPLE(-3)="-3"
USET   /1/^count="1"
TSET   /6/^SAMPLE(-2)="-2"
USET   /1/^count="2"
TSET   /6/^SAMPLE(-1)="-1"
USET   /1/^count="3"
TSET   /6/^SAMPLE(0)="0"
TSET   /6/^SAMPLE(1)="1"
USET   /1/^count="4"
TSET   /6/^SAMPLE(2)="2"
USET   /1/^count="5"
TSET   /6/^SAMPLE(3)="3"
USET   /1/^count="6"
# Test LGTRIG record gets generated and replicated without issues for maximum multi-line trigger size
# TLGTRIG record in primary extract
Length of the record TLGTRIG/"+^MULTILINE(8191,127) is : 1041608
# TLGTRIG record in secondary extract
Length of the record TLGTRIG/"+^MULTILINE(8191,127) is : 1041608
==Executing MULTISITE_REPLIC 'RUN INST2 $MUPIP trigger -select INST2.trg'==
==Executing MULTISITE_REPLIC 'RUN SRC=INST1 RCV=INST2 $gtm_tst/com/cp_remote_file.csh _REMOTEINFO___RCV_DIR__/INST2.trg __SRC_DIR__/'==
# diff trigger extracts from INST1 and INST2. Expect only SAMPLE related diff
# MULTILINE trigger should be the same and not show up in the diff below
132c132,138
< ;trigger name: SAMPLE#1 (region DEFAULT)  cycle: 3
---
> ;trigger name: SAMPLE#1 (region DEFAULT)  cycle: 6
> +^SAMPLE(-1) -commands=S -xecute="if $incr(^count)"
> ;trigger name: SAMPLE#2 (region DEFAULT)  cycle: 6
> +^SAMPLE(-2) -commands=S -xecute="if $incr(^count)"
> ;trigger name: SAMPLE#3 (region DEFAULT)  cycle: 6
> +^SAMPLE(-3) -commands=S -xecute="if $incr(^count)"
> ;trigger name: SAMPLE#4 (region DEFAULT)  cycle: 6
134c140
< ;trigger name: SAMPLE#2 (region DEFAULT)  cycle: 3
---
> ;trigger name: SAMPLE#5 (region DEFAULT)  cycle: 6
136c142
< ;trigger name: SAMPLE#3 (region DEFAULT)  cycle: 3
---
> ;trigger name: SAMPLE#6 (region DEFAULT)  cycle: 6
==Executing MULTISITE_REPLIC 'SYNC ALL_LINKS'==
==Executing MULTISITE_REPLIC 'STOP ALL_LINKS OFF'==
==Executing MULTISITE_REPLIC 'RUN INST1 $gtm_tst/com/dbcheck_base.csh '==
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
==Executing MULTISITE_REPLIC 'RUN INST2 $gtm_tst/com/dbcheck_base.csh '==
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
<commit_msg>Fix triggers/gtm7509 subtest reference file to also allow $zch(255) (in addition to the multibyte $c(255)) when test is run in UTF-8 mode since com/ydb_prior_ver_check.csh could have switched gtm_chset to M mode in case randomly chosen prior ver is < V63000A<commit_after># Test case 1 : Trying mupip trigger -select using a prior version, with a multi-line trigger created with current version
Files Created in ##TEST_PATH##:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
mumps.dat
# Trying "" as line terminator in multi-line trigger
Error : Multi-line xecute in $ztrigger ITEM must end in newline
0
# Try $ztrigger("select")
1
# Backup the database, to be used by prior version later
# Delete all triggers
No matching triggers found for deletion
1
-----------------------------------------------------------------------
# Trying $C(0) as line terminator in multi-line trigger
Error : Multi-line xecute in $ztrigger ITEM must end in newline
0
# Try $ztrigger("select")
1
# Backup the database, to be used by prior version later
# Delete all triggers
No matching triggers found for deletion
1
-----------------------------------------------------------------------
# Trying $C(10) as line terminator in multi-line trigger
Added SET trigger on ^a named a#1
1
# Try $ztrigger("select")
;trigger name: a#1 (region DEFAULT)  cycle: 1
+^a -commands=S -xecute=<<
 write 1,!
 write 2,!
>>
1
# Backup the database, to be used by prior version later
# Delete all triggers
All existing triggers (count = 1) deleted
1
-----------------------------------------------------------------------
# Trying $C(13) as line terminator in multi-line trigger
Error : Multi-line xecute in $ztrigger ITEM must end in newline
0
# Try $ztrigger("select")
1
# Backup the database, to be used by prior version later
# Delete all triggers
No matching triggers found for deletion
1
-----------------------------------------------------------------------
##SUSPEND_OUTPUT NONUNICODE_MODE
##TEST_AWK# Trying (\$C\(255\)|"ÿ") as line terminator in multi-line trigger
##ALLOW_OUTPUT NONUNICODE_MODE
##SUSPEND_OUTPUT UNICODE_MODE
# Trying $C(255) as line terminator in multi-line trigger
##ALLOW_OUTPUT UNICODE_MODE
Error : Multi-line xecute in $ztrigger ITEM must end in newline
0
# Try $ztrigger("select")
1
# Backup the database, to be used by prior version later
# Delete all triggers
No matching triggers found for deletion
1
-----------------------------------------------------------------------
# Test some valid and invalid multi-line commands with $c(10)
	>>
	^-----
##TEST_AWK		At column 0, line 3, source module .*
%GTM-E-LSEXPECTED, A line separator is expected here
Error : Parsing XECUTE string: " if ($incr(a)) write a,!"_$C(10)_" write ^a21,!"_$C(10)_">>"_$C(10)
0
Added SET trigger on ^a22 named a22#1
1
Added SET trigger on ^a3 named a3#1
1
Added SET trigger on ^a4 named a4#1
1
%GTM-E-LABELMISSING, Label referenced but not defined: trigwork
##TEST_AWK%GTM-I-SRCNAM, in source module .*
Error : Parsing XECUTE string: " do trigwork()"_$C(10)_" write 2,!"_$C(10)
0
	 w $gtm()
	    ^-----
##TEST_AWK		At column 5, line 1, source module .*
%GTM-E-INVFCN, Invalid function name
Error : Parsing XECUTE string: " w $gtm()"_$C(10)_" write 2,!"_$C(10)
0
# Trying mumps1.dat (multi-line trigger created with current version) with prior version trigger select
Output File: 
------------------------------------------------------------------------------------
# Trying mumps2.dat (multi-line trigger created with current version) with prior version trigger select
Output File: 
------------------------------------------------------------------------------------
# Trying mumps3.dat (multi-line trigger created with current version) with prior version trigger select
Output File: 
;trigger name: a#1#  cycle: 1
+^a -commands=S -xecute=<<
 write 1,!
 write 2,!
>>
------------------------------------------------------------------------------------
# Trying mumps4.dat (multi-line trigger created with current version) with prior version trigger select
Output File: 
------------------------------------------------------------------------------------
# Trying mumps5.dat (multi-line trigger created with current version) with prior version trigger select
Output File: 
------------------------------------------------------------------------------------
# Test case 5: While deleting triggers do not consider $c(10) as part of trigger
# Since the below two operations do not touch the db, just reuse the db of the current test case
# Expect Newline not allowed and not Invalid trigger for both the ztrigger calls below
Error : Newline not allowed in trigger name for delete operation
0
Error : Newline not allowed in trigger name for delete operation
0
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
# Test case 2 : Doing a trigger select when the XECUTE string in the ^#t global is corrupted such that the last newline is instead some other character
# should not SIG-11(pro) or assert fail(dbg)
Files Created in ##TEST_PATH##:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
mumps.dat
# Install the multiline trigger
File testcase2.trg, Line 1: Added SET trigger on ^a named abcd
=========================================
1 triggers added
0 triggers deleted
0 triggers modified
1 trigger file entries did update database trigger content
0 trigger file entries did not update database trigger content
=========================================
1
# Corrupt the last byte of the multi-line trigger with a byte randomly chosen from $c(0) thru $c(255)

File  	##TEST_PATH##/mumps.dat
Region	DEFAULT

# do mupip trigger -select and expect it to work
Output File: 
;trigger name: abcd (region DEFAULT)  cycle: 1
+^a -name=abcd -commands=S -xecute=<<
 do ^twork1
##TEST_AWK do \^twork2.
>>
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
# Test case 3a : while doing a wildcard trig deletion,
# a TLGTRIG record should be written to only one journaled region
Files Created in ##TEST_PATH##:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
a.dat
b.dat
c.dat
mumps.dat
Files Created in ##FILTERED##_REMOTE_TEST_PATH_/instance2:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
a.dat
b.dat
c.dat
mumps.dat
==Executing MULTISITE_REPLIC 'START INST1 INST2'==
Starting Primary Source Server in ##TEST_PATH##
Starting Passive Source Server and Receiver Server in ##FILTERED##_REMOTE_TEST_PATH_/instance2
# Install triggers in regions AREG And BREG
File testcase3.trg, Line 1: Added SET trigger on ^aglobal named aglobal#1
File testcase3.trg, Line 2: Added SET trigger on ^bcolon named atrigger2
=========================================
2 triggers added
0 triggers deleted
0 triggers modified
2 trigger file entries did update database trigger content
0 trigger file entries did not update database trigger content
=========================================
# Delete all triggers with -*
All existing triggers (count = 2) deleted
1
a.mjf
TLGTRIG/"+^aglobal   -commands=set -xecute=""do ^twork"""
USET   /8/^#t("#TNAME","aglobal","#SEQNUM")="1"
USET   /8/^#t("#TNAME","aglobal","#TNCOUNT")="1"
USET   /8/^#t("#TNAME","aglobal#1")="aglobal"_$C(0)_"1"
USET   /8/^#t("aglobal","#COUNT")="1"
USET   /8/^#t("aglobal",1,"TRIGNAME")="aglobal#1#"
USET   /8/^#t("aglobal",1,"CMD")="S"
USET   /8/^#t("aglobal",1,"XECUTE")=" do ^twork"
USET   /8/^#t("aglobal","#CYCLE")="1"
TKILL  /0/^#t("#TNAME")
ULGTRIG/"-*"
UKILL  /0/^#t("aglobal")
USET   /0/^#t("aglobal","#CYCLE")="2"
-------------------------------------------------------------
b.mjf
TLGTRIG/"+^bcolon(:) -commands=set -xecute=""do ^twork"" -name=atrigger2"
USET   /8/^#t("#TNAME","atrigger2")="bcolon"_$C(0)_"1"
USET   /8/^#t("bcolon","#COUNT")="1"
USET   /8/^#t("bcolon",1,"TRIGNAME")="atrigger2#"
USET   /8/^#t("bcolon",1,"GVSUBS")="*"
USET   /8/^#t("bcolon",1,"CMD")="S"
USET   /8/^#t("bcolon",1,"XECUTE")=" do ^twork"
USET   /8/^#t("bcolon","#CYCLE")="1"
TKILL  /0/^#t("#TNAME")
UKILL  /0/^#t("bcolon")
USET   /0/^#t("bcolon","#CYCLE")="2"
-------------------------------------------------------------
c.mjf
-------------------------------------------------------------
mumps.mjf
-------------------------------------------------------------
==Executing MULTISITE_REPLIC 'SYNC ALL_LINKS'==
==Executing MULTISITE_REPLIC 'STOP ALL_LINKS OFF'==
==Executing MULTISITE_REPLIC 'EXTRACT ALL'==
DATABASE EXTRACT PASSED
==Executing MULTISITE_REPLIC 'RUN INST1 $gtm_tst/com/dbcheck_base.csh '==
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
==Executing MULTISITE_REPLIC 'RUN INST2 $gtm_tst/com/dbcheck_base.csh '==
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
==Executing MULTISITE_REPLIC 'RUN INST2 $gtm_tst/com/backup_dbjnl.csh testcase3a "*.dat *.gld *.mjl* *.mjf" "mv"'==
# Test case 3b : For a wildcard trigger deletion, if none of the trigger participating regions are journaled
# TLGTRIG should NOT be written to a non-participating region
Files Created in ##TEST_PATH##:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
a.dat
b.dat
c.dat
mumps.dat
# Install triggers in regions AREG And BREG
File testcase3.trg, Line 1: Added SET trigger on ^aglobal named aglobal#1
File testcase3.trg, Line 2: Added SET trigger on ^bcolon named atrigger2
=========================================
2 triggers added
0 triggers deleted
0 triggers modified
2 trigger file entries did update database trigger content
0 trigger file entries did not update database trigger content
=========================================
# Wildcard trigger delete with -a*
Deleted trigger named 'aglobal#1' for global ^aglobal (region AREG)
Deleted trigger named 'atrigger2' for global ^bcolon (region BREG)
All existing triggers named a* (count = 2) now deleted
1
c.mjf
TLGTRIG/"-a*"
-------------------------------------------------------------
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
# Test case 4 : Replication with multiline and large triggers
Files Created in ##TEST_PATH##:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
a.dat
mumps.dat
==Executing MULTISITE_REPLIC 'RUN INST2 ##TEST_COM_PATH##/dbcreate_base.csh mumps 2 -record_size=512 -glob=65536'==
Files Created in ##FILTERED##_REMOTE_TEST_PATH_/instance2:
Using: ##SOURCE_PATH##/mumps -run GDE
mumps.gld
Using: ##SOURCE_PATH##/mupip
a.dat
mumps.dat
==Executing MULTISITE_REPLIC 'START INST1 INST2'==
Starting Primary Source Server in ##TEST_PATH##
Starting Passive Source Server and Receiver Server in ##FILTERED##_REMOTE_TEST_PATH_/instance2
==Executing MULTISITE_REPLIC 'RUN INST2 $gtm_exe/mumps -run sectrig^gtm7509'==
Added SET trigger on ^SAMPLE named SAMPLE#1
Added SET trigger on ^SAMPLE named SAMPLE#2
Added SET trigger on ^SAMPLE named SAMPLE#3
==Executing MULTISITE_REPLIC 'SYNC INST1 INST2'==
Added SET trigger on ^SAMPLE named SAMPLE#1
Added SET trigger on ^SAMPLE named SAMPLE#2
Added SET trigger on ^SAMPLE named SAMPLE#3
File multiline8191.trg, Line 1: Added SET trigger on ^MULTILINE named MULTILINE#1
=========================================
1 triggers added
0 triggers deleted
0 triggers modified
1 trigger file entries did update database trigger content
0 trigger file entries did not update database trigger content
=========================================
==Executing MULTISITE_REPLIC 'SYNC INST1 INST2'==
==Executing MULTISITE_REPLIC 'SYNC INST1 INST2'==
==Executing MULTISITE_REPLIC 'STOP INST1 INST2'==
Shutting down Passive Source Server and Receiver Server in ##FILTERED##_REMOTE_TEST_PATH_/instance2
Shutting down Primary Source Server Server in ##TEST_PATH##
# ^SAMPLE and ^count in primary journal files
TSET   /6/^SAMPLE(-3)="-3"
TSET   /6/^SAMPLE(-2)="-2"
TSET   /6/^SAMPLE(-1)="-1"
TSET   /6/^SAMPLE(0)="0"
TSET   /6/^SAMPLE(1)="1"
USET   /1/^count="1"
TSET   /6/^SAMPLE(2)="2"
USET   /1/^count="2"
TSET   /6/^SAMPLE(3)="3"
USET   /1/^count="3"
# ^SAMPLE and ^count in secondary journal files
TSET   /6/^SAMPLE(-3)="-3"
USET   /1/^count="1"
TSET   /6/^SAMPLE(-2)="-2"
USET   /1/^count="2"
TSET   /6/^SAMPLE(-1)="-1"
USET   /1/^count="3"
TSET   /6/^SAMPLE(0)="0"
TSET   /6/^SAMPLE(1)="1"
USET   /1/^count="4"
TSET   /6/^SAMPLE(2)="2"
USET   /1/^count="5"
TSET   /6/^SAMPLE(3)="3"
USET   /1/^count="6"
# Test LGTRIG record gets generated and replicated without issues for maximum multi-line trigger size
# TLGTRIG record in primary extract
Length of the record TLGTRIG/"+^MULTILINE(8191,127) is : 1041608
# TLGTRIG record in secondary extract
Length of the record TLGTRIG/"+^MULTILINE(8191,127) is : 1041608
==Executing MULTISITE_REPLIC 'RUN INST2 $MUPIP trigger -select INST2.trg'==
==Executing MULTISITE_REPLIC 'RUN SRC=INST1 RCV=INST2 $gtm_tst/com/cp_remote_file.csh _REMOTEINFO___RCV_DIR__/INST2.trg __SRC_DIR__/'==
# diff trigger extracts from INST1 and INST2. Expect only SAMPLE related diff
# MULTILINE trigger should be the same and not show up in the diff below
132c132,138
< ;trigger name: SAMPLE#1 (region DEFAULT)  cycle: 3
---
> ;trigger name: SAMPLE#1 (region DEFAULT)  cycle: 6
> +^SAMPLE(-1) -commands=S -xecute="if $incr(^count)"
> ;trigger name: SAMPLE#2 (region DEFAULT)  cycle: 6
> +^SAMPLE(-2) -commands=S -xecute="if $incr(^count)"
> ;trigger name: SAMPLE#3 (region DEFAULT)  cycle: 6
> +^SAMPLE(-3) -commands=S -xecute="if $incr(^count)"
> ;trigger name: SAMPLE#4 (region DEFAULT)  cycle: 6
134c140
< ;trigger name: SAMPLE#2 (region DEFAULT)  cycle: 3
---
> ;trigger name: SAMPLE#5 (region DEFAULT)  cycle: 6
136c142
< ;trigger name: SAMPLE#3 (region DEFAULT)  cycle: 3
---
> ;trigger name: SAMPLE#6 (region DEFAULT)  cycle: 6
==Executing MULTISITE_REPLIC 'SYNC ALL_LINKS'==
==Executing MULTISITE_REPLIC 'STOP ALL_LINKS OFF'==
==Executing MULTISITE_REPLIC 'RUN INST1 $gtm_tst/com/dbcheck_base.csh '==
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.
==Executing MULTISITE_REPLIC 'RUN INST2 $gtm_tst/com/dbcheck_base.csh '==
##SOURCE_PATH##/mupip
##SOURCE_PATH##/mupip integ -REG *
No errors detected by integ.

{'fraction_non_alphanumeric': 0.21268285754864366, 'fraction_numerical': 0.02702030961511149, 'mean_word_length': 3.402845083632953, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1753876', 'n_tokens_mistral': 9751, 'n_tokens_neox': 9261, 'n_words': 3081}