From 890e4caf0be2bf625614e549f312ac18395651a0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 14 Dec 2020 15:41:56 +0100 Subject: Drop support for max_length in mysqli_fetch_fields() Retain the field, but always populate it with zero. This was already the case for PS without length updating. max_length has nothing lost in the field metadata -- it is a property of the specific result set, and requires scanning the whole result set to compute. PHP itself never uses max_length with mysqlnd, it is only exposed in the raw mysqli API. Keeping it for just that purpose is not worthwhile given the costs involved. People who actually need this for some reason can easily calculate it themselves, while making it obvious that the calculation requires a full result set scan. --- UPGRADING | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'UPGRADING') diff --git a/UPGRADING b/UPGRADING index a8ae9feeee..7f43588048 100644 --- a/UPGRADING +++ b/UPGRADING @@ -19,6 +19,13 @@ PHP 8.1 UPGRADE NOTES 1. Backward Incompatible Changes ======================================== +- MySQLi: + . mysqli_fetch_fields() and mysqli_fetch_field_direct() will now always return + zero for max_length. You can compute this information by iterating over the + result set and taking the maximum length. This is what PHP was doing + internally previously. + . The MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH option no longer has an effect. + - Standard: . version_compare() no longer accepts undocumented operator abbreviations. -- cgit v1.2.1