summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2014-04-10 16:44:54 +0300
committerAndrey Hristov <andrey@php.net>2014-04-10 16:44:54 +0300
commit63791d055ad64762c3f63e08ca7ad8ba1f44e0ab (patch)
treecf93f62a6b9b2c0c85cf00b0094501fa8166d938 /ext/pdo_mysql
parent973f379efcb43887a83317482c7916004d1a2506 (diff)
downloadphp-git-63791d055ad64762c3f63e08ca7ad8ba1f44e0ab.tar.gz
New result fetching mode for mysqlnd, which should use less memory but
implies more memory copy. The old method is still available and can be used. It stays as default. Choosing the method is through a flag to mysqli_query()/mysqli_real_query() New mode can be forced with an INI setting, for all extensions that support this mode (ext/mysql and mysqli, because PDO due to it's architecture can't support it) The setting is mysqlnd.fetch_data_copy=[0|1]
Diffstat (limited to 'ext/pdo_mysql')
-rw-r--r--ext/pdo_mysql/mysql_driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index 825fe2647f..581766b38a 100644
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -37,7 +37,7 @@
#include "zend_exceptions.h"
#if defined(PDO_USE_MYSQLND)
-# define pdo_mysql_init(persistent) mysqlnd_init(persistent)
+# define pdo_mysql_init(persistent) mysqlnd_init(MYSQLND_CLIENT_NO_FLAG, persistent)
#else
# define pdo_mysql_init(persistent) mysql_init(NULL)
#endif
@@ -752,7 +752,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
}
if (mysqlnd_connect(H->server, host, dbh->username, dbh->password, password_len, dbname, dbname_len,
- port, unix_socket, connect_opts TSRMLS_CC) == NULL) {
+ port, unix_socket, connect_opts, MYSQLND_CLIENT_NO_FLAG TSRMLS_CC) == NULL) {
#else
if (mysql_real_connect(H->server, host, dbh->username, dbh->password, dbname, port, unix_socket, connect_opts) == NULL) {
#endif