Config parameter 'DeadlockTimeout ': mystic affect of its PARITY / ODDNESS on DDL results ------------------------------------------------------------------------------------------
Key: CORE-5080 URL: http://tracker.firebirdsql.org/browse/CORE-5080 Project: Firebird Core Issue Type: Bug Components: Engine, ISQL Affects Versions: 2.5.5, 3.0 RC1 Reporter: Pavel Zotov Found for current snapshots of 2.5.6 and 3.0, all arch (SS/SC/CS). Create this script: === set term ^; execute block as begin execute statement 'drop sequence g'; when any do begin end end ^ -- commit -------------------------- [ 1 ] ^ create sequence g ^ -- commit -------------------------- [ 2 ] ^ create or alter procedure sp_get_remote_data returns(received_value int) as begin for execute statement ('execute block returns(curr_gen int) as begin curr_gen = gen_id(g,1); suspend; end') on external rdb$get_context('SYSTEM','DB_NAME') as user 'SYSDBA' password 'masterkey' role 'R_' || right( uuid_to_char(gen_uuid()),12 ) into received_value do suspend; end ^ commit ^ set term ;^ set list on; select g.*, gen_id(g,0) as gen_current_value from rdb$generators g where g.rdb$generator_name = upper('g'); === Then open firebird.conf and set DeadlockTimeout to any ODD value (7,9,11,... - whatever, up to 32767). Running this script will result (show for 2.5 only; on 3.0 we'll have more info but outcome is the same): RDB$GENERATOR_NAME G RDB$GENERATOR_ID 35 RDB$SYSTEM_FLAG 0 RDB$DESCRIPTION <null> GEN_CURRENT_VALUE 0 Then change DeadlockTimeout to EVEN value (2,4,6, ...) and run script again (NOTE: restart of server can be skipped, its no matter here). Result will be: Statement failed, SQLSTATE = 40001 deadlock -deadlock -concurrent transaction number is 329 Statement failed, SQLSTATE = 42000 invalid request BLR at offset 75 -generator G is not defined Also, not on lines marked as [ 1 ] and [ 2 ]. When comments from these COMMIT statements are removed, all work fine. PS. Checked on: WI-V2.5.6.26963 WI-V3.0.0.32281 -- 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 ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel