]> granicus.if.org Git - php/commitdiff
fix #35293 (PDO segfaults when using persistent connections)
authorAntony Dovgal <tony2001@php.net>
Sat, 19 Nov 2005 16:39:47 +0000 (16:39 +0000)
committerAntony Dovgal <tony2001@php.net>
Sat, 19 Nov 2005 16:39:47 +0000 (16:39 +0000)
ext/pdo/pdo_dbh.c

index 2e133da5a364bc4d9b74816fc7281a7eef7069e3..818c49dc27049cbadec08eefb4b4d56173b50ba1 100755 (executable)
@@ -341,6 +341,8 @@ static PHP_METHOD(PDO, dbh_constructor)
                if (pdbh) {
                        /* let's copy the emalloc bits over from the other handle */
                        pdbh->ce = dbh->ce;
+                       pdbh->def_stmt_ce = dbh->def_stmt_ce;
+                       pdbh->def_stmt_ctor_args = dbh->def_stmt_ctor_args;
                        pdbh->properties = dbh->properties;
                        /* kill the non-persistent thingamy */
                        efree(dbh);