fix possible segv on failed connect

This commit is contained in:
Wez Furlong 2004-07-27 23:58:19 +00:00
parent 20eac88e58
commit 7d788aeba4

View File

@ -274,6 +274,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
H = pecalloc(1, sizeof(pdo_mysql_db_handle), dbh->is_persistent);
dbh->methods = &mysql_methods;
H->einfo.errcode = 0;
H->einfo.errmsg = NULL;
@ -308,7 +309,6 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
H->attached = 1;
dbh->methods = &mysql_methods;
dbh->alloc_own_columns = 1;
dbh->supports_placeholders = 0;
dbh->max_escaped_char_length = 2;