FirebirdSQL / firebird-odbc-driver

Firebird ODBC driver
https://www.firebirdsql.org/en/odbc-driver/
29 stars 10 forks source link

ROLLBACK TO does rollback whole transaction [ODBC148] #145

Open firebird-automations opened 12 years ago

firebird-automations commented 12 years ago

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 commented 10 years ago

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 commented 10 years ago
Modified by: MT Jordan (mtjo62) Attachment: test\_firebird\_odbc\_error\.php \[ 12421 \]