summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_api.c
diff options
context:
space:
mode:
authorTyson Andre <tysonandre775@hotmail.com>2019-06-09 17:37:38 -0400
committerNikita Popov <nikita.ppv@gmail.com>2019-06-11 15:40:33 +0200
commit5d3e3a62a2c5a7ebe7f25ec453fb97d1429093a1 (patch)
tree37732f8feb00380d8db365b48b5b5dcbc1f1ad21 /ext/mysqli/mysqli_api.c
parent07c63c6fdfb36b4a45273bb8dd6abb11093b3552 (diff)
downloadphp-git-5d3e3a62a2c5a7ebe7f25ec453fb97d1429093a1.tar.gz
Be more precise about possible types for mysqli methods
mysqli has an uncommon approach to 64-bit compatibility: it will convert numbers that can't be represented on 32-bit platforms to a string. This is documented at https://www.php.net/manual/en/mysqli-stmt.affected-rows.php#refsect1-mysqli-stmt.affected-rows-returnvalues So if there's a query to a remote mysqli server that affects more than 2.2 billion rows, then the opcache inference might be incorrect. (It's possible to add a MAY_BE_STRING_ON_32_BIT_PLATFORM bitflag macro to account for this, but I don't think there's a need or want to?) Patches 3162285b86871fb22a85a50ce9bc30823da64b6a This is based on the list of php 7.4 functions using MYSQLI_RETURN_LONG_INT in mysqli_api.c
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r--ext/mysqli/mysqli_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 40c7d2982d..90967454c5 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -2029,8 +2029,8 @@ PHP_FUNCTION(mysqli_stmt_send_long_data)
}
/* }}} */
-/* {{{ proto mixed mysqli_stmt_affected_rows(object stmt)
- Return the number of rows affected in the last query for the given link */
+/* {{{ proto string|int|false mysqli_stmt_affected_rows(object stmt)
+ Return the number of rows affected in the last query for the given link. */
PHP_FUNCTION(mysqli_stmt_affected_rows)
{
MY_STMT *stmt;