Vlad, your explanation is very good, but I still don't understand
something: Why before step 1 the engine does not blocks the record avoiding
such problem?
Greetings.
Walter.
On Sat, Dec 27, 2014 at 5:19 AM, hv...@users.sourceforge.net
[firebird-support] firebird-support@yahoogroups.com wrote:
Update, internally, consists of following steps (simplified) :
1. read record
2. evaluate new record
3. write new record into data page
really, it is a more complex, but for now we interesting only in steps above.
At step 1, read-committed (RC) transaction waits for commit or rollback of
Vlad,
that helped me a lot, thank you. It is good to know what is going under the
hood of Firebird.
Now everything is much clearer for me and I know how to proceed with my problem.
Best regards.
On Dec 24, 2014, at 3:22 AM, brucedickin...@wp.pl [firebird-support]
firebird-support@yahoogroups.com wrote:
I have two threads which constantly and at the same time are writing to this
table:
UPDATE OR INSERT INTO PARAMS (NAME) VALUES(:P_NAME) MATCHING (NAME) RETURNING
ID;
Hello Ann
Maybe I am not understanding correctly, but:
*Case 1:*
- Transaction T1 starts with settings: READ WRITE WAIT READ COMMITTED
- Transaction T1 updates a record which ID is 23
- Transaction T2 starts with settings: READ WRITE WAIT READ COMMITTED
- Transaction T2 updates the
Hi,
I have a very simple table:
CREATE TABLE PARAMS
(
ID INTEGER NOT NULL,
NAME VARCHAR(32) NOT NULL,
CONSTRAINT PK_PARAMS PRIMARY KEY (ID),
CONSTRAINT UNQ_PARAMS UNIQUE (NAME)
);
I have two threads which constantly and at the same time are writing to this
table:
UPDATE OR INSERT
On 24-12-2014 09:22, brucedickin...@wp.pl [firebird-support] wrote:
I have a very simple table:
CREATE TABLE PARAMS
(
ID INTEGER NOT NULL,
NAME VARCHAR(32) NOT NULL,
CONSTRAINT PK_PARAMS PRIMARY KEY (ID),
CONSTRAINT UNQ_PARAMS UNIQUE (NAME)
);
I have two threads which
Hi.
You should 'lock' the record you are working with.
Did you read about 'with lock'?
I am not sure this will help you in this case, but
Hugo
On 24/12/2014 06:22, brucedickin...@wp.pl [firebird-support] wrote:
Hi,
I have a very simple table:
CREATE TABLE PARAMS
(
ID INTEGER NOT