Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Feb 19, 2012 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

environment: Classic / SuperClassic only

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue is duplicated by CORE5160 [ CORE5160 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue is duplicated by CORE5267 [ CORE5267 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

Link: This issue relate to CORE6382 [ CORE6382 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants