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) {
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:
net->options.timeout_write = *(unsigned int*) value;
break;
#endif
-#ifdef WHEN_SUPPORTED_BY_MYSQLI
case MYSQL_OPT_COMPRESS:
-#endif
- /* currently not supported. Todo!! */
+ net->options.flags |= MYSQLND_NET_FLAG_USE_COMPRESSION;
break;
default:
DBG_RETURN(FAIL);
The ABI will be broken and the methods structure will be somewhere else
in the memory which can crash external code. Feel free to reuse these.
*/
- char * unused1;
+#if SIZEOF_CHAR_P == 4
+ uint32_t unused1;
+#elif SIZEOF_CHAR_P == 8
+ uint64_t unused1;
+#else
+#error Not supported platform
+#endif
char * unused2;
char * unused3;
char * unused4;
char * unused5;
+
enum_mysqlnd_protocol_type protocol;
char *charset_name;
char *ssl_cipher;
char *ssl_passphrase;
zend_bool ssl_verify_peer;
+ uint64_t flags;
} MYSQLND_NET_OPTIONS;