Skip to content

Commit 1660988

Browse files
committed
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.
1 parent 7ddfe73 commit 1660988

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ PHP NEWS
88
- JSON:
99
. Fixed bug #77843 (Use after free with json serializer). (Nikita)
1010

11+
- PDO_MySQL:
12+
. Fixed bug #77944 (Wrong meta pdo_type for bigint on LLP64). (cmb)
13+
1114
- Session:
1215
. Fixed bug #77911 (Wrong warning for session.sid_bits_per_character). (cmb)
1316

ext/pdo_mysql/mysql_statement.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ static int pdo_mysql_stmt_col_meta(pdo_stmt_t *stmt, zend_long colno, zval *retu
876876
case MYSQL_TYPE_SHORT:
877877
case MYSQL_TYPE_INT24:
878878
case MYSQL_TYPE_LONG:
879-
#if SIZEOF_LONG==8
879+
#if SIZEOF_ZEND_LONG==8
880880
case MYSQL_TYPE_LONGLONG:
881881
#endif
882882
add_assoc_long(return_value, "pdo_type", PDO_PARAM_INT);

0 commit comments

Comments
 (0)