GDSCODE can have value = 0 in WHEN-section under some concurrent env., only in 
SC or CS (not in SS)
---------------------------------------------------------------------------------------------------

                 Key: CORE-4565
                 URL: http://tracker.firebirdsql.org/browse/CORE-4565
             Project: Firebird Core
          Issue Type: Bug
    Affects Versions: 3.0 Alpha 2
            Reporter: Pavel Zotov


Sample of code:

create or alter procedure sp_handle_rows (
    a_doc_id bigint,
    a_old_optype bigint)
as
    declare v_gdscode int;
    declare v_dd_id bigint;
    declare v_this varchar(80) = 'sp_handle_rows';
begin

    for
        select d.id
        from doc_data d
        where d.doc_id = :a_doc_id
        into v_dd_id
    do
    begin
        delete from qdistr q
        where
            q.snd_optype_id = :a_old_optype
            and q.rcv_optype_id in ( 1200, 3300 )
            and q.snd_id = :v_dd_id;
    end

when any do
    begin
        v_gdscode = gdscode;
        if ( v_gdscode not in( 335544336,  335544878 ) ) then
        begin
            in autonomous transaction do
            insert into perf_log(
                unit,
                fb_gdscode)
            values(
                :v_this,
                :v_gdscode);
        end

        exception;

    end

end

Here it might be that in WHEN ANY section value of `gdscode` variable can be 0 
(ZERO) rather than one that reflects lock-conflict.
This occurs only in SuperCLASSIC (and only in 3.x) and never in SuperServer.
Two or more concurrent attaches must work at the same data of table QDistr. 
After some time record in log table ('PERF_LOG') will appear with fb_gdscode = 
0.

I've sent full test to Vlad, got from him instruction where to update source 
and hope that this will work OK (currently testing it;  final report will be 
later).

PS. Many thanks to Vlad. This was headache during last two monthes.

-- 
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

        

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to