Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

PHP mysqlnd svn commit: r958 - trunk/php6/ext/mysqli

From: <ahristov(at)mysql.com>
Date: Wed Aug 29 2007 - 10:48:28 EDT


Author: ahristov
Date: 2007-08-29 16:48:28 +0200 (Wed, 29 Aug 2007) New Revision: 958

Modified:

   trunk/php6/ext/mysqli/mysqli.c
   trunk/php6/ext/mysqli/mysqli_nonapi.c
   trunk/php6/ext/mysqli/php_mysqli_structs.h
Log:
Add a hash key, to be used later for reusage of pconns

Modified: trunk/php6/ext/mysqli/mysqli.c


  • trunk/php6/ext/mysqli/mysqli.c 2007-08-29 14:37:14 UTC (rev 957) +++ trunk/php6/ext/mysqli/mysqli.c 2007-08-29 14:48:28 UTC (rev 958)
    @@ -200,6 +200,10 @@

 /* {{{ php_clear_mysql */
 void php_clear_mysql(MY_MYSQL *mysql) {

+	if (mysql->hash_key) {
+		efree(mysql->hash_key);
+		mysql->hash_key = NULL;
+	}
 	if (mysql->li_read) {
 		efree(Z_STRVAL_P(mysql->li_read));
 		FREE_ZVAL(mysql->li_read);

Modified: trunk/php6/ext/mysqli/mysqli_nonapi.c


  • trunk/php6/ext/mysqli/mysqli_nonapi.c 2007-08-29 14:37:14 UTC (rev 957) +++ trunk/php6/ext/mysqli/mysqli_nonapi.c 2007-08-29 14:48:28 UTC (rev 958)
    @@ -232,9 +232,8 @@
    } MyG(num_persistent)++; } - if (persistent) { - efree(hash_key); - } + + mysql->hash_key = hash_key; MyG(num_links)++;

 #if !defined(HAVE_MYSQLND)
@@ -243,6 +242,7 @@

         mysql->multi_query = 1;
 #endif  

+

 	if (!object || !instanceof_function(Z_OBJCE_P(object), mysqli_link_class_entry TSRMLS_CC)) {
 		MYSQLI_RETURN_RESOURCE(mysqli_resource, mysqli_link_class_entry);	
 	} else {
Do you need help?X

Modified: trunk/php6/ext/mysqli/php_mysqli_structs.h


  • trunk/php6/ext/mysqli/php_mysqli_structs.h 2007-08-29 14:37:14 UTC (rev 957) +++ trunk/php6/ext/mysqli/php_mysqli_structs.h 2007-08-29 14:48:28 UTC (rev 958)
    @@ -98,6 +98,7 @@

 typedef struct {

 	MYSQL			*mysql;
+	char			*hash_key;
 	zval			*li_read;
 	php_stream		*li_stream;
 	zend_bool		persistent;
-- 
MySQL Code Commits Mailing List
For list archives: 
http://lists.mysql.com/commits
To unsubscribe:    
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Wed Aug 29 10:50:27 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 08:55:09 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library