com php-src: Fix #50444: PDO-ODBC changes for 64-bit: NEWS ext/pdo_odbc/odbc_stmt.c ext/pdo_odbc/php_pdo_odb c_int.h
| From: | Stanislav Malyshev | Date: | Tue, 27 May 2014 05:17:29 +0000 |
| Subject: | com php-src: Fix #50444: PDO-ODBC changes for 64-bit: NEWS ext/pdo_odbc/odbc_stmt.c ext/pdo_odbc/php_pdo_odb c_int.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78561@lists.php.net to get a copy of this message | ||
Commit: 91e7b3b84f08a2fabed8ed2196a827e481a4b79c
Author: Andrew Kehrig <kehrigan@gmail.com> Mon, 24 Feb 2014 12:01:58 -0500
Committer: Stanislav Malyshev <stas@php.net> Mon, 26 May 2014 22:17:29 -0700
Parents: 076c25bfec126a431de574e4bad8df053ba50374
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=91e7b3b84f08a2fabed8ed2196a827e481a4b79c
Log:
Fix #50444: PDO-ODBC changes for 64-bit
This bug is also referenced in
[#61777](https://bugs.php.net/bug.php?id=61777) and is still present in
the latest stable release of the 5.5 branch. I see two tickets exist for
this problem already, and I'm just submitting these changes via github
as a reminder that this is a serious problem for anyone using PDO_ODBC
on the x64 builds.
Bugs:
https://bugs.php.net/50444
https://bugs.php.net/61777
Changed paths:
M NEWS
M ext/pdo_odbc/odbc_stmt.c
M ext/pdo_odbc/php_pdo_odbc_int.h
Diff:
diff --git a/NEWS b/NEWS
index 199bebd..3a3ed73 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,9 @@ PHP NEWS
- OPCache:
. Fixed issue #183 (TMP_VAR is not only used once). (Dmitry, Laruence)
+- PDO-ODBC:
+ . Fixed bug #50444 (PDO-ODBC changes for 64-bit).
+
?? ??? 2014, PHP 5.5.13
- CLI server:
diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c
index 8b0ccf3..1d275cd 100644
--- a/ext/pdo_odbc/odbc_stmt.c
+++ b/ext/pdo_odbc/odbc_stmt.c
@@ -279,7 +279,7 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *p
pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data;
RETCODE rc;
SWORD sqltype = 0, ctype = 0, scale = 0, nullable = 0;
- UDWORD precision = 0;
+ SQLULEN precision = 0;
pdo_odbc_param *P;
/* we're only interested in parameters for prepared SQL right now */
@@ -551,7 +551,7 @@ static int odbc_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC)
struct pdo_column_data *col = &stmt->columns[colno];
RETCODE rc;
SWORD colnamelen;
- SDWORD colsize;
+ SQLULEN colsize;
SQLLEN displaysize;
rc = SQLDescribeCol(S->stmt, colno+1, S->cols[colno].colname,
diff --git a/ext/pdo_odbc/php_pdo_odbc_int.h b/ext/pdo_odbc/php_pdo_odbc_int.h
index 87b2f91..5e42951 100644
--- a/ext/pdo_odbc/php_pdo_odbc_int.h
+++ b/ext/pdo_odbc/php_pdo_odbc_int.h
@@ -157,7 +157,7 @@ typedef struct {
} pdo_odbc_stmt;
typedef struct {
- SQLINTEGER len;
+ SQLLEN len;
SQLSMALLINT paramtype;
char *outbuf;
unsigned is_unicode:1;