FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.22k stars 213 forks source link

Transaction can`t change metadata if it is run in no_wait and there is another connect that once had queried these metadata [CORE3766] #4110

Open firebird-automations opened 12 years ago

firebird-automations commented 12 years ago

Submitted by: @pavel-zotov

Is duplicated by CORE5160 Is duplicated by CORE5267 Relate to CORE6382

WI-V2.5.2.26390 Firebird 2.5

DDL: C:\1INSTALL\FIREBIRD\Data>isql Use CONNECT or CREATE DATABASE to specify a database SQL> create database 't2.fdb'; commit; SQL> create table tx(id int); commit; SQL> insert into tx values(123); commit; SQL> quit; ---------------------------------------------------------

session #⁠1

C:\1INSTALL\FIREBIRD\Data>isql -n localhost/3050:C:\1INSTALL\FIREBIRD\Data\T2.FDB Database: localhost/3050:C:\1INSTALL\FIREBIRD\Data\T2.FDB

session #⁠2

C:\1INSTALL\FIREBIRD\Data>isql -n localhost/3050:C:\1INSTALL\FIREBIRD\Data\T2.FDB Database: localhost/3050:C:\1INSTALL\FIREBIRD\Data\T2.FDB

session #⁠1

SQL> set list on; SQL> select * from tx;

ID 123

SQL> commit; SQL> select * from rdb$database;

RDB$DESCRIPTION <null> RDB$RELATION_ID 129 RDB$SECURITY_CLASS <null> RDB$CHARACTER_SET_NAME NONE

SQL> commit;

session #⁠2 SQL> commit; SQL> SET TRANSACTION READ COMMITTED RECORD_VERSION NO WAIT; -- note: only when *read commited* and *NO wait* SQL> drop table tx; SQL> commit; Statement failed, SQLSTATE = 40001 lock conflict on no wait transaction -unsuccessful metadata update -object TX is in use

firebird-automations commented 12 years ago

Commented by: @pavel-zotov

PS.
It seems that TIL (read committed record_version | no record_version vs snapshot) does not matter. The metadata can`t be changed only when "NO WAIT" clause is specified.

firebird-automations commented 12 years ago
Modified by: @pavel-zotov summary: Transaction can\`t change metadata if it is run in RC \+ no\_wait and there is another connect that once had queried these metadata =\> Transaction can\`t change metadata if it is run in no\_wait and there is another connect that once had queried these metadata
firebird-automations commented 12 years ago
Modified by: @dyemanov assignee: Dmitry Yemanov \[ dimitr \] environment: Classic / SuperClassic only
firebird-automations commented 8 years ago
Modified by: @dyemanov Link: This issue is duplicated by [CORE5160](https://github.com/FirebirdSQL/firebird/issues?q=CORE5160+in%3Atitle) \[ [CORE5160](https://github.com/FirebirdSQL/firebird/issues?q=CORE5160+in%3Atitle) \]
firebird-automations commented 8 years ago
Modified by: @dyemanov Link: This issue is duplicated by [CORE5267](https://github.com/FirebirdSQL/firebird/issues?q=CORE5267+in%3Atitle) \[ [CORE5267](https://github.com/FirebirdSQL/firebird/issues?q=CORE5267+in%3Atitle) \]
firebird-automations commented 3 years ago
Modified by: Sean Leyne (seanleyne) Link: This issue relate to [CORE6382](https://github.com/FirebirdSQL/firebird/issues?q=CORE6382+in%3Atitle) \[ [CORE6382](https://github.com/FirebirdSQL/firebird/issues?q=CORE6382+in%3Atitle) \]