wez Sun Jul 13 04:48:43 2003 EDT Modified files: /php-src/ext/sqlite sqlite.c Log: Fix bug #24575 (sqlite_popen did not request a new resource id when persistent handles were re-used within a request). Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.72 php-src/ext/sqlite/sqlite.c:1.73 --- php-src/ext/sqlite/sqlite.c:1.72 Tue Jul 8 19:10:01 2003 +++ php-src/ext/sqlite/sqlite.c Sun Jul 13 04:48:43 2003 @@ -17,7 +17,7 @@ | Marcus Boerger <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: sqlite.c,v 1.72 2003/07/08 23:10:01 helly Exp $ + $Id: sqlite.c,v 1.73 2003/07/13 08:48:43 wez Exp $ */ #ifdef HAVE_CONFIG_H @@ -314,7 +314,14 @@ php_sqlite_callback_invalidator(funcs TSRMLS_CC); } } + +static ZEND_RSRC_DTOR_FUNC(php_sqlite_pdb_invalidator) +{ + struct php_sqlite_db *db = (struct php_sqlite_db*)rsrc->ptr; + db->rsrc_id = FAILURE; +} + static ZEND_RSRC_DTOR_FUNC(php_sqlite_db_dtor) { if (rsrc->ptr) { @@ -889,7 +896,7 @@ #endif le_sqlite_db = zend_register_list_destructors_ex(php_sqlite_db_dtor, NULL, "sqlite database", module_number); - le_sqlite_pdb = zend_register_list_destructors_ex(NULL, php_sqlite_db_dtor, "sqlite database (persistent)", module_number); + le_sqlite_pdb = zend_register_list_destructors_ex(php_sqlite_pdb_invalidator, php_sqlite_db_dtor, "sqlite database (persistent)", module_number); le_sqlite_result = zend_register_list_destructors_ex(php_sqlite_result_dtor, NULL, "sqlite result", module_number); REGISTER_LONG_CONSTANT("SQLITE_BOTH", PHPSQLITE_BOTH, CONST_CS|CONST_PERSISTENT); @@ -948,7 +955,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.72 2003/07/08 23:10:01 helly Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.73 2003/07/13 08:48:43 wez Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end();
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php