Bug #74179 [NEW]: Large mysql requests broken after update to 7.0.x

From: Date: Mon, 27 Feb 2017 21:27:35 +0000
Subject: Bug #74179 [NEW]: Large mysql requests broken after update to 7.0.x
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207595@lists.php.net to get a copy of this message
From:             nish dot aravamudan at canonical dot com
Operating system: Ubuntu 16.04
PHP version:      7.0.16
Package:          MySQL related
Bug Type:         Bug
Bug description:Large mysql requests broken after update to 7.0.x

Description:
------------
Original bug report:
https://bugs.launchpad.net/ubuntu/+source/php7.0/+bug/1668017

Roughly, we produced a security/update update of the PHP7.0 package in
Ubuntu which bumped up to 7.0.15. A user reported that this regressed
their installation, specifically:

a web application serving rather big binary blobs from a MariaDB table.
After the unattended update (7.0.8-0ubuntu0.16.04.3 to
7.0.15-0ubuntu0.16.04.2), the application would routinely break while
trying to fetch a >16Mbyte row from the database server.

Requests resulting in a row under 16Mbyte are processed normally,
anything above it would return columns in the wrong order, and right
around 0xFFFFF2 a null-character (0x00) is inserted into the stream
(when the resulting file is compared to one served with the version used
previously)

---

The prior (working) version was 7.0.8 based.

Test script:
---------------
The reporter provided a relatively straightforward test case:

- Ubuntu 16.04
- MariaDB Server (not tested on mysql, but I expect similar results)
- php 7.0 (7.0.15)
- phpMyAdmin

Configuration:
MariaDB: max_allowed_packet = 128M
php: post_max_size and upload_max_filesize raised to 128M

Import the some SQL data, for instance: https://we.tl/vb37KISpUU.
This will build you a MyISAM table with 4 columns, 3x varchar(1) and 1
longblob. The table will have one big blob in it, with 32Mbyte worth of
0x20 (space)

Downloading the binary through phpMyAdmin on 7.0.15 will produce a file
with a null-character inserted at (for my setup) 0xFFFFF6, the rest of
the file is as expected.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=74179&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=74179&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=74179&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=74179&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=74179&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=74179&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=74179&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=74179&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=74179&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=74179&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=74179&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=74179&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=74179&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=74179&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74179&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=74179&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=74179&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=74179&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74179&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=74179&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=74179&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#207595) next »