php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47017 mysqlnd does not work with MYSQL_CLIENT_COMPRESS flag
Submitted: 2009-01-06 10:45 UTC Modified: 2009-11-20 10:09 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: surfchen at gmail dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 5.3CVS-2009-01-06 (snap) OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: surfchen at gmail dot com
New email:
PHP Version: OS:

 

 [2009-01-06 10:45 UTC] surfchen at gmail dot com
Description:
------------
If mysql_connect(use mysqlnd as driver) with MYSQL_CLIENT_COMPRESS,the script blocks on mysql_query calling for a while and output warning.

Reproduce code:
---------------
mysql_connect('127.0.0.1:3306','root','urpig',false,MYSQL_CLIENT_COMPRESS);
mysql_query('SELECT 1');

Expected result:
----------------
no warning

Actual result:
--------------
Warning: mysql_query(): Error while reading SET_OPTION's EOF packet. PID=20646

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-08 10:48 UTC] andrey@php.net
Is the bug that the connection cannot be used after setting the flag or that the compressed protocol is not supported? Do you use the compression and how does it make your application run faster? Is your MySQL server on the local network or remote?

Thanks you!
Andrey
 [2009-01-08 12:22 UTC] surfchen at gmail dot com
> Is the bug that the connection cannot be used after setting the flag or that the compressed protocol is not supported? 
This is can be used for mysql_get_server_info()(maybe this function was getting these info on connecting) and similar functions,but can't be used for mysql_query().What's more,when using for mysql_set_charset(),a large memory was allocated(Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 807601282 bytes)),It's so strange.(memory problem is another topic, sorry for explaining here.)


> Do you use the compression and how does it make your application run faster? 
I can't follow your meaning.This question seems not related to our topic.

> Is your MySQL server on the local network or remote?
I have tested both unix socket and tcp in my box.No "network".And my mysql server have compression enabled(it need to be enable?I forget.).It can be connected and used with php ext/mysql driven by lib libmysql with the MYSQL_CLIENT_COMPRESS.so it's not a server problem.

Let me desc more detail.

I don't know mysqlnd how to link and use compression lib,but I have compile with "./configure --with-mysql=mysqlnd --with-zlib --with-zlib-dir=/usr/local" and I can see "ZLib Support => enabled" in php -i(means that the zlib dir are correct.), and During the compilation,there is error ,warning or notice tell me that "you was doing incorrectly".

This bug is raised whether enable zts or not.
 [2009-01-19 09:56 UTC] surfchen at gmail dot com
typo:
there is error,warning => there is no error,warning
 [2009-02-03 11:52 UTC] johannes@php.net
MYSQL_CLIENT_COMPRESS, in most cases, costs CPU but doesn't result in a measurable gain in throughput. It will most likely not be implemented in mysqlnd till 5.3.0 is released.
 [2009-10-09 14:20 UTC] uw@php.net
The patch is ready and tested. It will be committed once PHP 5.3.1 has been released.
 [2009-11-20 08:52 UTC] uw@php.net
mysqlnd now supports the compressed protocol.
 [2009-11-20 10:09 UTC] UW@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

http://news.php.net/php.doc.cvs/5482
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC