You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to access some object with already closed attachment initialization code (common for all objects) tries to access already missing attachment. An issue is partially fixed in pull request #37. However, other objects require same fix, not only request.
att1 = fdb.connect(dsn=dsn)
trn1 = att1.trans( default_tpb = customTPB )
cur1 = trn1.cursor()
stt='select mon$database_name from mon$database'
cur1.prep(stt)
print( att1.firebird_version )
att1.close()
cur1.execute(stt)
for row in cur1.fetchall():
print(row[0])
Output:
Traceback (most recent call last):
File "http://c5285t.py", line 23, in <module>
cur1.execute(stt)
File "C:\Python27\lib\site-packages\fdb\http://fbcore.py", line 3567, in execute
self._transaction.begin()
File "C:\Python27\lib\site-packages\fdb\http://fbcore.py", line 3978, in begin
raise ProgrammingError("Transaction is permanently closed.")
fdb.fbcore.ProgrammingError: Transaction is permanently closed.
The text was updated successfully, but these errors were encountered:
How to test:
Attach to database, prepare statement, detach from database, next ask statement to execute or open cursor.
On 3.0.0 this should cause segfault. On current snapshots - expected message like 'statement handle invalid'.
Test Details: Any idea how test can be implemented for this ticket ?.. => Unfortunatelly, problem can not be reproduced when running in Python + fdb scenario described by Alex:
att1 = fdb.connect(dsn=dsn)
trn1 = att1.trans( default_tpb = customTPB )
cur1 = trn1.cursor()
stt='select mon$database_name from mon$database'
cur1.prep(stt)
print( att1.firebird_version )
att1.close()
cur1.execute(stt)
for row in cur1.fetchall():
print(row[0])
Output:
Traceback (most recent call last):
File "http://c5285t.py", line 23, in <module>
cur1.execute(stt)
File "C:\Python27\lib\site-packages\fdb\http://fbcore.py", line 3567, in execute
self._transaction.begin()
File "C:\Python27\lib\site-packages\fdb\http://fbcore.py", line 3978, in begin
raise ProgrammingError("Transaction is permanently closed.")
fdb.fbcore.ProgrammingError: Transaction is permanently closed.
Submitted by: @AlexPeshkoff
When trying to access some object with already closed attachment initialization code (common for all objects) tries to access already missing attachment. An issue is partially fixed in pull request #37. However, other objects require same fix, not only request.
Commits: a1c576b 5cf6d59
====== Test Details ======
Unfortunatelly, problem can not be reproduced when running in Python + fdb scenario described by Alex:
import os
import fdb
os.environ["ISC_USER"] = 'SYSDBA'
os.environ["ISC_PASSWORD"] = 'masterke'
cdir="c:/mix/firebird/QA/fbt-repo/tmp/"
fbport="3331"
dbfile=cdir+"e30.fdb"
dsn='localhost/'+fbport+':'+dbfile
customTPB = ( [ fdb.isc_tpb_read_committed, fdb.isc_tpb_rec_version, fdb.isc_tpb_nowait ] )
att1 = fdb.connect(dsn=dsn)
trn1 = att1.trans( default_tpb = customTPB )
cur1 = trn1.cursor()
stt='select mon$database_name from mon$database'
cur1.prep(stt)
print( att1.firebird_version )
att1.close()
cur1.execute(stt)
for row in cur1.fetchall():
print(row[0])
Output:
Traceback (most recent call last):
File "http://c5285t.py", line 23, in <module>
cur1.execute(stt)
File "C:\Python27\lib\site-packages\fdb\http://fbcore.py", line 3567, in execute
self._transaction.begin()
File "C:\Python27\lib\site-packages\fdb\http://fbcore.py", line 3978, in begin
raise ProgrammingError("Transaction is permanently closed.")
fdb.fbcore.ProgrammingError: Transaction is permanently closed.
The text was updated successfully, but these errors were encountered: