--- a/components/php-5_3/php-sapi/patches/091_php_pdo_stmt_race.patch Wed Jan 29 00:54:26 2014 -0800
+++ b/components/php-5_3/php-sapi/patches/091_php_pdo_stmt_race.patch Wed Jan 29 18:57:31 2014 -0800
@@ -1,3 +1,14 @@
+6911348 back port pdo race bug for opensolaris
+6909525 PDO race condition fix for multithreaded php
+which states:
+There is a race condition in pdo which was found when running olio inside Sun Web Server (nsapi).
+http://bugs.php.net/bug.php?id=49937&thanks=1
+
+Fix has been submitted but because of lack of reviewer it has not been committed into php tree.
+
+We need to carry this patch until it is merged.
+
+
--- php-5.3.10/ext/pdo/pdo_stmt.c_orig Sun Jan 1 05:15:04 2012
+++ php-5.3.10/ext/pdo/pdo_stmt.c Wed Feb 8 11:25:26 2012
@@ -2322,6 +2322,51 @@
@@ -65,7 +76,7 @@
stmt->refcount = 1;
ALLOC_HASHTABLE(stmt->properties);
zend_hash_init(stmt->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
-- zend_hash_copy(stmt->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
+- zend_hash_copy(stmt->properties, &ce->default_properties, (copy_ctor_func_t) zval_property_ctor, (void *) &tmp, sizeof(zval *));
+ init_stmt_properties(stmt TSRMLS_CC);
retval.handle = zend_objects_store_put(stmt, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t)pdo_dbstmt_free_storage, (zend_objects_store_clone_t)dbstmt_clone_obj TSRMLS_CC);