firebird-odbc-driver icon indicating copy to clipboard operation
firebird-odbc-driver copied to clipboard

ROLLBACK TO does rollback whole transaction [ODBC148]

Open firebird-automations opened this issue 13 years ago • 2 comments

Submitted by: Jojakim Stahl (jstahl)

Attachments: test_firebird_odbc_error.php

Votes: 1

It seems that the statement ROLLBACK TO ... rolls back the whole transaction. The driver-internal parser detects that the statement starts with ROLLBACK, doesn't send it to the server but instead turns it into an sqlEndTran(SQL_ROLLBACK).

I have the impression, that all which is related to Firbird Savepoints is not supported by the driver at the moment. This assumption is based on the fact, that the statement SAVEPOINT is not detected by the driver internal parser and send as is to the server. I don't know whether this works - or has it to be intercepted like COMMIT, SET TRANSACTION, ROLLBACK etc. and turned into a specific isc_xxx call?

firebird-automations avatar May 31 '12 18:05 firebird-automations

Commented by: MT Jordan (mtjo62)

I have verified this issue as well. Attached is a test file to verify compatibility between database drivers. The script is designed to rollback to a savepoint and commit the initial update query. The rollback to savepoint query rollsback all queries.

Windows NT BUZZ 6.1 build 7601 (Windows 7 Home Premium Edition Service Pack 1) i586 Apache/2.4.2 (Win32) PHP/5.5.9 WI-V6.3.2.26540 Firebird 2.5 Firebird_ODBC_2.0.2.153

firebird-automations avatar Feb 13 '14 05:02 firebird-automations

Modified by: MT Jordan (mtjo62)

Attachment: test_firebird_odbc_error.php [ 12421 ]

firebird-automations avatar Feb 13 '14 05:02 firebird-automations