From 16609880f8338134db08daf6bdcc42025f938fcd Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 27 Apr 2019 18:46:27 +0200 Subject: [PATCH] Fix #77944: Wrong meta pdo_type for bigint on LLP64 When actually fetching the data, bigint (unsigned) column values are returned as integers on LLP64 architectures, so their pdo_type has to be PDO::PARAM_INT accordingly. --- NEWS | 3 +++ ext/pdo_mysql/mysql_statement.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 2cbbcc26b2..b48bd1eacc 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,9 @@ PHP NEWS - JSON: . Fixed bug #77843 (Use after free with json serializer). (Nikita) +- PDO_MySQL: + . Fixed bug #77944 (Wrong meta pdo_type for bigint on LLP64). (cmb) + - Session: . Fixed bug #77911 (Wrong warning for session.sid_bits_per_character). (cmb) diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index f4a3879998..2777f3ccc4 100644 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -876,7 +876,7 @@ static int pdo_mysql_stmt_col_meta(pdo_stmt_t *stmt, zend_long colno, zval *retu case MYSQL_TYPE_SHORT: case MYSQL_TYPE_INT24: case MYSQL_TYPE_LONG: -#if SIZEOF_LONG==8 +#if SIZEOF_ZEND_LONG==8 case MYSQL_TYPE_LONGLONG: #endif add_assoc_long(return_value, "pdo_type", PDO_PARAM_INT); -- 2.40.0