diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-02-13 17:16:24 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-02-13 17:16:24 +0000 |
commit | f57b8d6dc52e86a2fb4392a16f77db25d232d34a (patch) | |
tree | 910cf8e743c0876110fdfd6954c1a9e44dee2526 | |
parent | f860c70362bb6a60b2cc0ade49a418290c0e7e16 (diff) | |
download | php-git-f57b8d6dc52e86a2fb4392a16f77db25d232d34a.tar.gz |
Set auto-commit after establishing the connection, otherwise we have a crash.
-rwxr-xr-x | ext/pdo_mysql/mysql_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index fa41ec07e1..c4c6539d4f 100755 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -324,8 +324,6 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ } } - mysql_handle_autocommit(dbh TSRMLS_CC); - if (vars[2].optval && !strcmp("localhost", vars[2].optval)) { unix_socket = vars[4].optval; } else { @@ -337,6 +335,8 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ goto cleanup; } + mysql_handle_autocommit(dbh TSRMLS_CC); + H->attached = 1; dbh->alloc_own_columns = 1; |