|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-01-01 12:27 UTC] felipe@php.net
-Package: PDO related
+Package: PDO ODBC
[2020-09-28 14:04 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2020-09-28 14:04 UTC] cmb@php.net
[2020-10-11 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
Description: ------------ I was trying to use PDO_ODBC with HP Vertica but it returns the "Invalid buffer position" error. I don't have this problem using ODBC Functions and I am using it now instead of PDO_ODBC but decided to report the issue anyways... By looking at the ODBC trace files, I see that when pdo_odbc binds parameter, it always sets the BufferLength argument of the SQLBindParameter() function to 0. I believe this is wrong, since the input is a character type, and as a result there is a buffer overrun. Test script: --------------- $query = "select * from category where name = :nome"; $sth = $this->_lnk->prepare($query); $category = 'Hardcore'; $sth->bindParam(':nome', $category); $sth->execute(); Expected result: ---------------- The query result Actual result: -------------- Fails with error: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 50240 [Vertica][Support] (50240) Invalid buffer position. (SQLExecute[50240] at /builddir/build/BUILD/php-5.4.21/ext/pdo_odbc/odbc_stmt.c:254)' in /admin_vertica_report.class.php on line 39