Subject Re: problem with "set transaction read committed no wait no record_version"
Author emb_blaster
Hi Cristoph,

I tryed to reproduce this in a Delphi application using IBX component. Don't received any deadlock error with read_committed no_wait no_record_version parameters.
Also, it runs like YOU expected, ignoring uncommitted trans, but reading committed trans, and showing no error in any case.
But in isql I'm getting the same error here.

Maybe with some sql sample anyone could help?
That's what I did to test what Cristoph said.

create a database like this:

SET SQL DIALECT 3;

SET NAMES NONE;

CONNECT 'C:\temp\teste.fdb' USER 'SYSDBA' PASSWORD 'masterkey';

CREATE TABLE "t" (
CODIGO INTEGER NOT NULL,
NOME1 VARCHAR(5),
NOME2 VARCHAR(5) CHARACTER SET WIN1252 COLLATE PXW_INTL850,
NOME3 VARCHAR(5) CHARACTER SET WIN1252 COLLATE WIN_PTBR,
NOME4 VARCHAR(5) CHARACTER SET ISO8859_1 COLLATE PT_PT,
NOME5 VARCHAR(5) CHARACTER SET ISO8859_1 COLLATE PT_BR
);


INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (0, 'x', 'x', 'x', 'x', 'x');
INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (1, 'a', 'a', 'a', 'a', 'a');
INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (2, 'A', 'A', 'A', 'A', 'A');
INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (3, 'á', 'á', 'á', 'á', 'á');
INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (4, 'ã', 'ã', 'ã', 'ã', 'ã');
INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (5, 'Â', 'Â', 'Â', 'Â', 'Â');
INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (6, 'b', 'b', 'b', 'b', 'b');
INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (7, 'a ', 'a ', 'a ', 'a ', 'a ');
INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (8, 'aa', 'aa', 'aa', 'aa', 'aa');
INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (9, 'a a', 'a a', 'a a', 'a a', 'a a');
INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (10, 'a b', 'a b', 'a b', 'a b', 'a b');
INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (11, 'B', 'B', 'B', 'B', 'B');
INSERT INTO "t" (CODIGO, NOME1, NOME2, NOME3, NOME4, NOME5) VALUES (12, 'X', 'X', 'X', 'X', 'X');

COMMIT WORK;

ok;

so start first instance of isql: (let's call it isql1)

isql1:

CONNECT 'C:\temp\teste.fdb' USER 'SYSDBA' PASSWORD 'masterkey';
set transaction read committed no wait no record_version;
select * from "t";

every thing looks fine.

so let's start second instance:
isql2:
CONNECT 'C:\temp\teste.fdb' USER 'SYSDBA' PASSWORD 'masterkey';
set transaction read committed no wait no record_version;
update "t" set NOME1='Z'where CODIGO = 12;

now let's go back first instance:
isql1:
select * from "t";

Statement failed, SQLCODE = -901
lock conflict on no wait transaction
-deadlock

as explained, expected to it run flawlessly showing old data (where NOME1 still 'X')

If I go back to isql2 and committ or Rollback, so select in isql1 runs ok, showing NOME1 = 'Z' or 'X'.

Well, don't know why, but in IBX on Delphi it runs as expected. And if I understand all posts, this should be the case of isql too, right? or I'm misundertooding any post?