[php-src] PR #23614: odbc: replace SQLError with SQLGetDiagRec

From: Date: Tue, 08 Sep 2026 10:47:25 +0000
Subject: [php-src] PR #23614: odbc: replace SQLError with SQLGetDiagRec
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-38384@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/23614 Author: iliaal Follow-up to #23612, converting the two remaining SQLError callers as discussed there. Both now go through one odbc_diag_rec() helper that reproduces SQLError's handle selection, statement else connection else environment, so the reported SQLSTATE and message text are unchanged. No ODBCVER guard: ODBC 3.0 is already a hard requirement here. SQLAllocHandle with SQL_HANDLE_STMT appears at 13 unguarded sites, SQLColAttribute and SQLFetchScroll are unguarded, and odbc_bindcols() already calls SQLGetDiagRec unguarded. The one semantic difference is that SQLError dequeues a diagnostic record while SQLGetDiagRec is indexed. Each caller sits in a mutually exclusive switch arm, so nothing reads a second record for the same handle without an intervening ODBC call, which resets the queue.

« previous php.git-pulls (#38384) next »