[Pkg-php-commits] [php/debian-sid] Import upstream fix for pdo_mysql segfaults reported in #581911
Sean Finney
seanius at seanius.net
Sat Jun 19 13:40:52 UTC 2010
Thanks: Richard van den Berg <richard at vdberg.org>
Closes: #581911
---
debian/patches/581911_pdo_mysql_segfaults.patch | 76 +++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 77 insertions(+), 0 deletions(-)
create mode 100644 debian/patches/581911_pdo_mysql_segfaults.patch
diff --git a/debian/patches/581911_pdo_mysql_segfaults.patch b/debian/patches/581911_pdo_mysql_segfaults.patch
new file mode 100644
index 0000000..c71078b
--- /dev/null
+++ b/debian/patches/581911_pdo_mysql_segfaults.patch
@@ -0,0 +1,76 @@
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581911
+Origin: http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c?r1=294269&r2=294274&view=patch
+--- php.orig/ext/pdo_mysql/pdo_mysql.c
++++ php/ext/pdo_mysql/pdo_mysql.c
+@@ -115,12 +115,11 @@ static PHP_MINFO_FUNCTION(pdo_mysql)
+ /* }}} */
+
+
+-#if PDO_USE_MYSQLND
++#if PDO_USE_MYSQLND && PDO_DBG_ENABLED
+ /* {{{ PHP_RINIT_FUNCTION
+ */
+ static PHP_RINIT_FUNCTION(pdo_mysql)
+ {
+-#if PDO_DBG_ENABLED
+ if (PDO_MYSQL_G(debug)) {
+ MYSQLND_DEBUG *dbg = mysqlnd_debug_init(mysqlnd_debug_std_no_trace_funcs TSRMLS_CC);
+ if (!dbg) {
+@@ -129,18 +128,15 @@ static PHP_RINIT_FUNCTION(pdo_mysql)
+ dbg->m->set_mode(dbg, PDO_MYSQL_G(debug));
+ PDO_MYSQL_G(dbg) = dbg;
+ }
+-#endif
+
+ return SUCCESS;
+ }
+ /* }}} */
+
+-
+ /* {{{ PHP_RSHUTDOWN_FUNCTION
+ */
+ static PHP_RSHUTDOWN_FUNCTION(pdo_mysql)
+ {
+-#if PDO_DBG_ENABLED
+ MYSQLND_DEBUG *dbg = PDO_MYSQL_G(dbg);
+ PDO_DBG_ENTER("RSHUTDOWN");
+ if (dbg) {
+@@ -148,11 +144,11 @@ static PHP_RSHUTDOWN_FUNCTION(pdo_mysql)
+ dbg->m->free_handle(dbg);
+ PDO_MYSQL_G(dbg) = NULL;
+ }
+-#endif
++
+ return SUCCESS;
+ }
+ /* }}} */
+-
++#endif
+
+ /* {{{ PHP_GINIT_FUNCTION
+ */
+@@ -167,8 +163,6 @@ static PHP_GINIT_FUNCTION(pdo_mysql)
+ #endif
+ }
+ /* }}} */
+-#endif
+-
+
+ /* {{{ pdo_mysql_functions[] */
+ const zend_function_entry pdo_mysql_functions[] = {
+@@ -205,15 +199,11 @@ zend_module_entry pdo_mysql_module_entry
+ #endif
+ PHP_MINFO(pdo_mysql),
+ "1.0.2",
+-#if PDO_USE_MYSQLND
+ PHP_MODULE_GLOBALS(pdo_mysql),
+ PHP_GINIT(pdo_mysql),
+ NULL,
+ NULL,
+ STANDARD_MODULE_PROPERTIES_EX
+-#else
+- STANDARD_MODULE_PROPERTIES
+-#endif
+ };
+ /* }}} */
+
diff --git a/debian/patches/series b/debian/patches/series
index 9b61d4c..52c5e1c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -69,3 +69,4 @@ upstream/incorrect_docroot_eval.patch
upstream/soap_mem_leak.patch
upstream/incorrect_SplFileInfo_fscanf_prototype.patch
install-programs_parallel_FTBFS.patch
+581911_pdo_mysql_segfaults.patch
--
1.6.5
More information about the Pkg-php-commits
mailing list