Suppose I set SCRIPT_STOP_ON_SQL_EXCEPTION=TRUE. But lets say I've turned off autocommit. If a sql exception does occur and the script stops executing, I want to be able to specify whether I should do a commit or rollback of what is already in my transaction.
Hence, the introduction of this new variable.
We should also add this as a command line option to the source command.
This variable is created and assigned a NONE value when a Fluid Shell is launched. An option, -tx, is added to the FS \source command and FS command line interface (CLI), see \source man page and FS CLI usage message for more info.
If -tx is supplied, FS CLI will assign the value specified by -tx option to SCRIPT_ON_SQL_EXCEPTION_TRANSACTION; otherwise, FS CLI initializes SCRIPT_ON_SQL_EXCEPTION_TRANSACTION to NONE.
For \source command, similar to SCRIPT_STOP_ON_CMD_EXCEPTION and SCRIPT_STOP_ON_SQL_EXCEPTION variables, if -tx is supplied, \source will update SCRIPT_ON_SQL_EXCEPTION_TRANSACTION only if it is defined.
Again, this feature will take effect only if all of the following conditions are true:
(1) an SQL exception has occurred,
(2) stop on SQL exception is being set to TRUE,
(3) autocommit is turned off.
SVN r30990 - 13.0 branch
SVN r30991 - trunk
On execution of \source command, \source will always update the SCRIPT_ON_SQL_EXCEPTION_TRANSACTION variable based on its settings if the SCRIPT_ON_SQL_EXCEPTION_TRANSACTION variable is defined: if -tx is supplied, the SCRIPT_ON_SQL_EXCEPTION_TRANSACTION variable is assigned the value specified by -tx; if -tx is not supplied, default value 'NONE' is assigned to the variable.
On execution of \source command, if the SCRIPT_ON_SQL_EXCEPTION_TRANSACTION variable is not defined: \source will not create this variable.
Please see issue #8175, 1/16/2013 comment for more info.
SVN r31103 - 13.0 branch
SVN r31104 - trunk
On execution of \source command, \source will always update the SCRIPT_ON_SQL_EXCEPTION_TRANSACTION variable based on its settings if the SCRIPT_ON_SQL_EXCEPTION_TRANSACTION variable is defined: if -tx is supplied, the SCRIPT_ON_SQL_EXCEPTION_TRANSACTION variable is assigned the value specified by -tx; if -tx is not supplied, default value 'NONE' is assigned to the variable.
On execution of \source command, if the SCRIPT_ON_SQL_EXCEPTION_TRANSACTION variable is not defined: \source will not create this variable.
Please see issue #8175, 1/16/2013 comment for more info.
SVN r31103 - 13.0 branch
SVN r31104 - trunk
Issue #8190 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 13.0/r30990,31103; trunk/r30991,31104 |
No time estimate |
1 issue link |
relates to #8175
Issue #8175FluidShell enhancement - conditionally fail or continue based upon sql success |
This variable is created and assigned a NONE value when a Fluid Shell is launched. An option, -tx, is added to the FS \source command and FS command line interface (CLI), see \source man page and FS CLI usage message for more info.
If -tx is supplied, FS CLI will assign the value specified by -tx option to SCRIPT_ON_SQL_EXCEPTION_TRANSACTION; otherwise, FS CLI initializes SCRIPT_ON_SQL_EXCEPTION_TRANSACTION to NONE.
For \source command, similar to SCRIPT_STOP_ON_CMD_EXCEPTION and SCRIPT_STOP_ON_SQL_EXCEPTION variables, if -tx is supplied, \source will update SCRIPT_ON_SQL_EXCEPTION_TRANSACTION only if it is defined.
Again, this feature will take effect only if all of the following conditions are true:
(1) an SQL exception has occurred,
(2) stop on SQL exception is being set to TRUE,
(3) autocommit is turned off.
SVN r30990 - 13.0 branch
SVN r30991 - trunk