Documentation inconsistency DISABLE TRIGGERS statement?

Posted by bronco on 04-Jan-2017 03:14

Hi!

In the 10.1B help for DISABLE TRIGGERS it says:

LOAD: Disabling triggers for LOAD disables all triggers associated with the CREATE, WRITE, DELETE, REPLICATION-CREATE, REPLICATION-WRITE, REPLICATION-DELETE, and ASSIGN events for the named table.

in 11.6 however: 

LOAD: Disabling triggers for LOAD disables all triggers associated with the CREATE, WRITE, REPLICATION-CREATE, REPLICATION-WRITE, REPLICATION-DELETE, and ASSIGN events for the named table.

So, this implies that in 11.6 that the DELETE trigger is not disabled with the DISABLE TRIGGERS FOR LOAD OF ...

Has this been changed somewhere between 10.1B & 11.6 or is this a documentation bug?

Posted by Fernando Souza on 04-Jan-2017 08:54

It is a doc issue. What it should be trying to say is that the LOAD option will disable the DELETE trigger, unless you specify ALLOW-REPLICATION. That is why under "ALLOW-REPLICATION" it is saying that the DELETE trigger is not disabled.

Unfortunately that was the behavior for a long time, and to avoid introducing a regression, we kept that behavior and allow you to also disable the DELETE trigger when ALLOW-REPLICATION is turned on by starting the session with -disabledeltrig.

So to sum it up:

DISABLE TRIGGERS FOR LOAD OF <table> - disables DELETE trigger

DISABLE TRIGGERS FOR LOAD OF <table> ALLOW-REPLICATION - does *not* disable DELETE trigger

DISABLE TRIGGERS FOR LOAD OF <table> ALLOW-REPLICATION  + -disabledeltrig - disables DELETE trigger

All Replies

Posted by bronco on 04-Jan-2017 03:41

To make matter more complicated. KB 000068205 states:

In releases later than 10.2B00, start the session using the -disabledeltrig parameter, then disable triggers, using one of the below methods, for any tables that you wish to override DELETE trigger behavior for.

BUFFER <table>:DISABLE-LOAD-TRIGGERS([allow-replication]).

or...

DISABLE TRIGGERS FOR LOAD OF <table>.

At the bottom of the 11.6 help however:

The Disable Delete Trigger (-disabledeltrig) startup parameter disables the DELETE trigger when ALLOW-REPLICATION is on for the DISABLE TRIGGERS statement or the DISABLE-LOAD-TRIGGER() buffer method. For more information about this parameter, see OpenEdge Deployment: Startup Command and Parameter Reference.

So the delete trigger in 11.6 is disabled ONLY when -disabledeltrig is used AND ALLOW-replication is specified.

Posted by Fernando Souza on 04-Jan-2017 08:54

It is a doc issue. What it should be trying to say is that the LOAD option will disable the DELETE trigger, unless you specify ALLOW-REPLICATION. That is why under "ALLOW-REPLICATION" it is saying that the DELETE trigger is not disabled.

Unfortunately that was the behavior for a long time, and to avoid introducing a regression, we kept that behavior and allow you to also disable the DELETE trigger when ALLOW-REPLICATION is turned on by starting the session with -disabledeltrig.

So to sum it up:

DISABLE TRIGGERS FOR LOAD OF <table> - disables DELETE trigger

DISABLE TRIGGERS FOR LOAD OF <table> ALLOW-REPLICATION - does *not* disable DELETE trigger

DISABLE TRIGGERS FOR LOAD OF <table> ALLOW-REPLICATION  + -disabledeltrig - disables DELETE trigger

Posted by bronco on 04-Jan-2017 09:04

Thanks Fernando for the clarification.

This thread is closed