]> granicus.if.org Git - php/commitdiff
looks like this approach will give us our exceptions back
authorWez Furlong <wez@php.net>
Wed, 28 Jul 2004 00:10:28 +0000 (00:10 +0000)
committerWez Furlong <wez@php.net>
Wed, 28 Jul 2004 00:10:28 +0000 (00:10 +0000)
ext/pdo_mysql/mysql_driver.c

index 7ea65c06c72bd267e4150ef6b789d8aedf7b5a87..700543ab5b710a39d523d263416ce81edfd14aae 100755 (executable)
@@ -275,7 +275,6 @@ 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;
 
@@ -313,6 +312,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
        dbh->alloc_own_columns = 1;
        dbh->supports_placeholders = 0;
        dbh->max_escaped_char_length = 2;
+       dbh->methods = &mysql_methods;
 
        ret = 1;
        
@@ -322,6 +322,8 @@ cleanup:
                        efree(vars[i].optval);
                }
        }
+       
+       dbh->methods = &mysql_methods;
 
        return ret;
 }