note 48345 deleted from function.odbc-free-result by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 10:13:39 +0000 |
| Subject: | note 48345 deleted from function.odbc-free-result by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196913@lists.php.net to get a copy of this message | ||
Note Submitter: rich at kastle dot com
----
("Note: If auto-commit is disabled (see odbc_autocommit()) and you call odbc_free_result()
before committing, all pending transactions are rolled back.")
I've looked thru the code, and that note is definitely wrong, at least in my environment
(Windows/SQL Server). odbc_free_result ultimately just calls SQLFreeStmt which has NO EFFECT on
outstanding transactions.
In fact, it seems it must be wrong for all environments, because the SQLFreeStmt is bound to the
destruction of the result resource. So unset($result) would be just as dangerous - and you're
randomly and unpredictably screwed if garbage collection reaps the result set before your
transaction's done.