Issue Details (XML | Word | Printable)

Key: CORE-3766
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Pavel Zotov
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

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

Created: 19/Feb/12 07:08 PM   Updated: 10/Jun/16 03:15 PM
Component/s: None
Affects Version/s: 2.5.1
Fix Version/s: None

Environment: Classic / SuperClassic only
Issue Links:
Duplicate
 


 Description  « Hide
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

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Zotov added a comment - 20/Feb/12 03:16 AM
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.