'set bail on' command is ignored when script is run "inside" ISQL using 'IN <test.sql>' (rather than from command line switch, i.e. isql -i <test.sql>) ---------------------------------------------------------------------------------------------------------------------------------------------------------
Key: CORE-4598 URL: http://tracker.firebirdsql.org/browse/CORE-4598 Project: Firebird Core Issue Type: Bug Components: ISQL Reporter: Pavel Zotov Consider following script (name = 'test_bail.sql'): --- begin of script --- show version; set bail on; set autoddl off; commit; set term ^; execute block as begin begin execute statement 'recreate exception ex_exclusive_required ''At least one concurrent connection detected.'''; when any do begin end end end ^ set term ;^ commit; set term ^; execute block as begin if ( exists( select * from mon$attachments a where a.mon$attachment_id<>current_connection and a.mon$remote_protocol is not null ) ) then exception ex_exclusive_required; end ^ set term ;^ commit; select current_timestamp as dts,'set bail on is ignored!' as msg from rdb$database; --- end of script --- Session #1: connect to database Session #2: run this script in two cases. Case-1: ====== Using command-line switch '-i': isql 192.168.0.220/3253:/var/db/fb25/oltp25b.fdb -i test_bail.sql Output: ====== Statement failed, SQLSTATE = HY000 exception 3 -EX_EXCLUSIVE_REQUIRED -At least one concurrent connection detected. After line 18 in file test_bail.sql Case-2: ======= Using 'IN <script>' command: C:\MIX\firebird\OLTPTEST\trunk>isql 192.168.0.220/3253:/var/db/fb25/oltp25b.fdb SQL> in test_bail.sql; Output: ====== <. . .> Statement failed, SQLSTATE = HY000 exception 5 -EX_EXCLUSIVE_REQUIRED -At least one concurrent connection detected. After line 18 in file test_bail.sql DTS MSG ========================= ======================= 2014-11-06 22:34:47.6290 set bail on is ignored! Why 'set bail on' was ignored in case-2 ? PS. Results are the same for 2.5 and 3.0 PPS. Adding '-b' switch to command that run ISQL (C:\...>isql 192.168.0.220/3253:/var/db/fb25/oltp25b.fdb -b) - does NOT help. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel