diff options
author | Andrey Hristov <andrey@php.net> | 2010-09-01 14:47:36 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-09-01 14:47:36 +0000 |
commit | b2bcf3ae48ae2325839d55f95f23b3799bf78b28 (patch) | |
tree | ee3eac4f16a82b4d152ab544072571e9fe837e2c /ext/mysqlnd/mysqlnd.c | |
parent | 001d83dc47b57313cc13f9a6e80f3492faf15d80 (diff) | |
download | php-git-b2bcf3ae48ae2325839d55f95f23b3799bf78b28.tar.gz |
OPT_COMPRESS support for mysqlnd_conn::set_client_option
To be used by mysqli_options
Diffstat (limited to 'ext/mysqlnd/mysqlnd.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index faac95ea86..4c7789ac0e 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -714,6 +714,10 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND * conn, if (mysql_flags & CLIENT_COMPRESS) { mysql_flags &= ~CLIENT_COMPRESS; } +#else + if (conn->net->options.flags & MYSQLND_NET_FLAG_USE_COMPRESSION) { + mysql_flags |= CLIENT_COMPRESS; + } #endif #ifndef MYSQLND_SSL_SUPPORTED if (mysql_flags & CLIENT_SSL) { @@ -2034,9 +2038,7 @@ MYSQLND_METHOD(mysqlnd_conn, set_client_option)(MYSQLND * const conn, DBG_ENTER("mysqlnd_conn::set_client_option"); DBG_INF_FMT("conn=%llu option=%u", conn->thread_id, option); switch (option) { -#ifdef WHEN_SUPPORTED_BY_MYSQLI case MYSQL_OPT_COMPRESS: -#endif #ifdef WHEN_SUPPORTED_BY_MYSQLI case MYSQL_OPT_READ_TIMEOUT: case MYSQL_OPT_WRITE_TIMEOUT: |