|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-12-03 20:03 UTC] bwoebi@php.net
-Assigned To:
+Assigned To: mysql
[2014-12-03 20:08 UTC] bwoebi@php.net
-Summary: Mysql fails with compression active and big random
data
+Summary: Mysqlnd fails with compression active and big random
data
[2017-10-24 08:14 UTC] kalle@php.net
-Status: Assigned
+Status: Open
-Assigned To: mysql
+Assigned To:
[2020-10-15 13:03 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2020-10-15 13:03 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 08:00:01 2025 UTC |
Description: ------------ If the compressed packet payload is bigger than 0xffffff (because DEFLATE increased the size), then the payload length will overflow on 24 bit boundary and PHP ends up with a warning and fails. Test script: --------------- ini_set("memory_limit", "1G"); $db = mysqli_init(); $db->real_connect(HOST, USER, PASS, DB, 3306, null, MYSQL_CLIENT_COMPRESS); $q = $db->prepare("INSERT INTO tmp (text) VALUES (?)"); $n = null; $q->bind_param('b', $n); $x = file_get_contents("/dev/urandom", 0, null, -1, 0xffffff - 1); $q->send_long_data(0, $x); $q->execute(); Expected result: ---------------- Successful insert in database... Actual result: -------------- Warning: Error while sending STMT_SEND_LONG_DATA packet. PID=%d in %s on line %d (Doesn't matter if QUERY, PREPARE or STMT_SEND_LONG_DATA packet or what ever; issue is always the same.)