summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2009-09-30 23:13:43 +0000
committerAndrey Hristov <andrey@php.net>2009-09-30 23:13:43 +0000
commitba5c40b2ad4acf4c7327098728325899cc020266 (patch)
tree9ae893e6ab33a56181e99b3d3992887a3cc29287 /ext/mysqlnd/mysqlnd.c
parentb9dcc28c24d76508786691a0ce7b4ec89e2131e3 (diff)
downloadphp-git-ba5c40b2ad4acf4c7327098728325899cc020266.tar.gz
Use mnd_ wrappers wherever possible. Needed for
statistics.
Diffstat (limited to 'ext/mysqlnd/mysqlnd.c')
-rw-r--r--ext/mysqlnd/mysqlnd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index 222b2e5f61..904a310dba 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -96,7 +96,7 @@ MYSQLND_METHOD(mysqlnd_conn, free_options)(MYSQLND *conn TSRMLS_DC)
unsigned int i;
for (i = 0; i < conn->options.num_commands; i++) {
/* allocated with pestrdup */
- pefree(conn->options.init_commands[i], pers);
+ mnd_pefree(conn->options.init_commands[i], pers);
}
mnd_pefree(conn->options.init_commands, pers);
conn->options.init_commands = NULL;
@@ -669,7 +669,12 @@ PHPAPI MYSQLND *mysqlnd_connect(MYSQLND *conn,
conn->greet_charset = mysqlnd_find_charset_nr(greet_packet.charset_no);
/* we allow load data local infile by default */
- mysql_flags |= CLIENT_LOCAL_FILES;
+ mysql_flags |= CLIENT_LOCAL_FILES | CLIENT_PS_MULTI_RESULTS;
+#ifndef MYSQLND_COMPRESSION_ENABLED
+ if (mysql_flags & CLIENT_COMPRESS) {
+ mysql_flags &= ~CLIENT_COMPRESS;
+ }
+#endif
auth_packet->user = user;
auth_packet->password = passwd;