diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-14 15:41:56 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-17 10:01:02 +0100 |
commit | 890e4caf0be2bf625614e549f312ac18395651a0 (patch) | |
tree | 9f037e9b4266dca4556fc69c5ff98547f08da12c /UPGRADING | |
parent | 95a4e1ea3b689c6bdc666435933047df4aff3f6f (diff) | |
download | php-git-890e4caf0be2bf625614e549f312ac18395651a0.tar.gz |
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.
Diffstat (limited to 'UPGRADING')
-rw-r--r-- | UPGRADING | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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. |