Concurrent Update from same user(sysdba) with UPDATE OR INSERT INTO TABLE fail 
(same keys)
------------------------------------------------------------------------------------------

                 Key: CORE-4007
                 URL: http://tracker.firebirdsql.org/browse/CORE-4007
             Project: Firebird Core
          Issue Type: Bug
    Affects Versions: 2.5.2
         Environment: Win7 ,I5 3220,  8GB RAM Intel SSD
Firebird 2.5.3 Page size 8192 
            Reporter: Kritsotakis Matheos


Concurrent update of a table from sysdba (maybe two different users )  
If we update the file with the following commands 

update COUNTRY
set
  BANKCOMMIS = :BANKCOMMIS,  BILLACCOUNT = :BILLACCOUNT,  COIN = :COIN,  
DESCRIPT = :DESCRIPT,  DESOFCOIN = :DESOFCOIN, 
  EUREXCHANGE = EUREXCHANGE,  EURGROUP = :EURGROUP,  IDNR = :IDNR,  LANGUAGECD 
= :LANGUAGECD
where
  LANGUAGECD = :OLD_LANGUAGECD

updating the table visual by the user

and executing the command

        Update or Insert into Country( LANGUAGECD, DESCRIPT ) Values('DE' , 
'Germany')   MATCHING (LANGUAGECD)

with the same primary key

cause the command (Update or Insert into Country) to fail



cannot execute
The table metadata 

/* Domain definitions */
CREATE DOMAIN "BOOLINT" AS SMALLINT DEFAULT 1 CHECK (VALUE IN (1,0));
CREATE DOMAIN "NUM5D2" AS NUMERIC(5, 2)  DEFAULT 0;
CREATE DOMAIN "VCHAR25" AS VARCHAR(25);

CREATE TABLE "COUNTRY" 
(
  "IDNR"        SMALLINT NOT NULL,
  "DESCRIPT"    "VCHAR25",
  "COIN"        VARCHAR(15),
  "LANGUAGECD"  CHAR(2) NOT NULL,
  "BANKCOMMIS"  "NUM5D2",
  "EURGROUP"    "BOOLINT",
  "EUREXCHANGE" "NUM5D2" DEFAULT 1,
  "BILLACCOUNT" INTEGER,
  "DESOFCOIN"   VARCHAR(15),
CONSTRAINT "PK_COUNTRY" PRIMARY KEY ("LANGUAGECD")
);

SET TERM ^ ;
CREATE TRIGGER "COUNTRY_BI" FOR "COUNTRY" 
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
   NEW.IdNr = GEN_ID(GEN_COUNTRY_ID,1);
   if(NEW.EUREXCHANGE IS NULL)  THEN NEW.EUREXCHANGE = 1;
END
 ^

COMMIT WORK ^
SET TERM ;^



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

        

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to