DbUpdateConcurrencyException is not thrown when expected
--------------------------------------------------------

                 Key: DNET-714
                 URL: http://tracker.firebirdsql.org/browse/DNET-714
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider, Entity Framework support
    Affects Versions: 5.5.0.0
         Environment: FB3, .NET 4.6.2, Win7 64, EF6.1.3
            Reporter: Scot Lunsford
            Assignee: Jiri Cincura


The following sql is executed for an update. The SQL looks correct. But it 
doesn't detect that the update failed because another user edited the same row. 
Instead it throw the DbUpdateException because the returned CreateUser value is 
null.

FirebirdSql.Data.FirebirdClient Information: 0 : Command:
EXECUTE BLOCK (
p0 BLOB SUB_TYPE TEXT = @p0, p1 BIGINT = @p1, p2 CHAR(16) CHARACTER SET OCTETS 
= @p2
) RETURNS (
"CREATEUSER" VARCHAR(31), "MODUSER" VARCHAR(31), "CREATEDATE" TIMESTAMP, 
"MODDATE" TIMESTAMP, "ROWVERSION" CHAR(16) CHARACTER SET OCTETS)
AS BEGIN
UPDATE "SCENARIO"
SET "DESCRIPTION" = :p0
WHERE (("SCENARIOID" = :p1) AND ("ROWVERSION" = :p2))
RETURNING "CREATEUSER", "MODUSER", "CREATEDATE", "MODDATE", "ROWVERSION" INTO 
:"CREATEUSER", :"MODUSER", :"CREATEDATE", :"MODDATE", :"ROWVERSION";
SUSPEND;
END

Parameters:
Name:@p0        Type:Text       Used Value:This scenario was edit testing again
Name:@p1        Type:BigInt     Used Value:1032
Name:@p2        Type:Guid       Used Value:0b5f7468-0580-a347-b2f0-6214478f2d8c

Exception thrown: 'System.Data.Entity.Infrastructure.DbUpdateException' in 
EntityFramework.dll
A null store-generated value was returned for a non-nullable member 
'CREATEUSER' of type 'CAG.DBManager.DataLayer.Models.SCENARIO'.
Exception thrown: 'System.Data.Entity.Infrastructure.DbUpdateException' in 
DataLayer.dll

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

        

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to