diff options
author | Wez Furlong <wez@php.net> | 2005-07-02 21:01:38 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-07-02 21:01:38 +0000 |
commit | 1bbab254554a63dfc8d1507883323f29349dd850 (patch) | |
tree | 407621b77f856159e57391743eedc5840f690eac /ext/pdo_mysql/mysql_driver.c | |
parent | 6fd9e5a64fc7450b2bd5787a21d9102166258d14 (diff) | |
download | php-git-1bbab254554a63dfc8d1507883323f29349dd850.tar.gz |
Experimental support for queries returning multiple rowsets under mysql 5.0.
Patch from Guy Harrison (guy dot a dot harrison (at) gmail dot com)
Diffstat (limited to 'ext/pdo_mysql/mysql_driver.c')
-rwxr-xr-x | ext/pdo_mysql/mysql_driver.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 8d15cf35a0..a0f7ac07c1 100755 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2004 The PHP Group | + | Copyright (c) 1997-2005 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -305,6 +305,14 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ { "port", "3306", 0 }, { "unix_socket", PDO_MYSQL_UNIX_ADDR, 0 }, }; + int connect_opts = 0 +#ifdef CLIENT_MULTI_RESULTS + |CLIENT_MULTI_RESULTS +#endif +#ifdef CLIENT_MULTI_STATEMENTS + |CLIENT_MULTI_STATEMENTS +#endif + ; php_pdo_parse_data_source(dbh->data_source, dbh->data_source_len, vars, 4); @@ -337,7 +345,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ port = atoi(vars[3].optval); } dbname = vars[1].optval; - if (mysql_real_connect(H->server, host, dbh->username, dbh->password, dbname, port, unix_socket, 0) == NULL) { + if (mysql_real_connect(H->server, host, dbh->username, dbh->password, dbname, port, unix_socket, connect_opts) == NULL) { pdo_mysql_error(dbh); goto cleanup; } |