|
From: Vlad K. (JIRA) <tr...@fi...> - 2009-09-16 21:22:35
|
Invalid BLOB ID when working with monitoring tables
---------------------------------------------------
Key: CORE-2632
URL: http://tracker.firebirdsql.org/browse/CORE-2632
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 2.5 Beta 2, 2.5 Beta 1, 2.1.3
Reporter: Vlad Khorsun
If first query with monitoring tables in transaction not returned blob fields to the client (i.e. blob fields was not present in SELECT list) than subsequent queries in the same transaction which referenced blob fields will fail with "Invalid BLOB ID" error.
The reason is :
- first query in transaction involving any monitoring table triggers creation of monitoring snapshot for this transaction
- when snapshot is created some temporary blobs is created too and bound to the transaction and to the request
- if this blobs not passed to the client its remains bound to the request
- when request finish its execution all temporary blobs bound to it released
- when another request going to open blob it fails
Example
firebird\bin>isql -user SYSDBA -pass masterkey s:\TEST.FDB -ch UNICODE_FSS
Database: s:\TEST.FDB, User: SYSDBA
SQL> select 1 from mon$database;
CONSTANT
============
1
SQL> select mon$sql_text from mon$statements;
MON$SQL_TEXT
=================
0:1
==============================================================================
MON$SQL_TEXT:
Statement failed, SQLSTATE = 42000
invalid BLOB ID
SQL> commit;
SQL> select mon$sql_text from mon$statements;
MON$SQL_TEXT
=================
0:1
==============================================================================
MON$SQL_TEXT:
select mon$sql_text from mon$statements
==============================================================================
SQL> select mon$sql_text from mon$statements;
MON$SQL_TEXT
=================
0:1
==============================================================================
MON$SQL_TEXT:
select mon$sql_text from mon$statements
==============================================================================
SQL> exit;
Note, i used UNICODE_FSS connection charset. This is needed to avoid involving transliteration filter which is used by the engine if connection charset is different from blob field charset (see also patch for CORE-2602)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|