[PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c
georg Sun Apr 2 09:40:19 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/mysqli mysqli.c Log: Added additional information for compiled header files. http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/mysqli.c?r1=1.72.2.15r2=1.72.2.16diff_format=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.72.2.15 php-src/ext/mysqli/mysqli.c:1.72.2.16 --- php-src/ext/mysqli/mysqli.c:1.72.2.15 Thu Mar 30 11:21:51 2006 +++ php-src/ext/mysqli/mysqli.c Sun Apr 2 09:40:19 2006 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.72.2.15 2006/03/30 11:21:51 tony2001 Exp $ + $Id: mysqli.c,v 1.72.2.16 2006/04/02 09:40:19 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -626,7 +626,8 @@ { php_info_print_table_start(); php_info_print_table_header(2, MysqlI Support, enabled); - php_info_print_table_row(2, Client API version, mysql_get_client_info()); + php_info_print_table_row(2, Client API library version, mysql_get_client_info()); + php_info_print_table_row(2, Client API header version, MYSQL_SERVER_VERSION); php_info_print_table_row(2, MYSQLI_SOCKET, MYSQL_UNIX_ADDR); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c
tony2001Wed Mar 29 16:29:53 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/mysqli mysqli.c Log: fix typo http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/mysqli.c?r1=1.72.2.13r2=1.72.2.14diff_format=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.72.2.13 php-src/ext/mysqli/mysqli.c:1.72.2.14 --- php-src/ext/mysqli/mysqli.c:1.72.2.13 Wed Mar 29 14:28:42 2006 +++ php-src/ext/mysqli/mysqli.c Wed Mar 29 16:29:53 2006 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.72.2.13 2006/03/29 14:28:42 tony2001 Exp $ + $Id: mysqli.c,v 1.72.2.14 2006/03/29 16:29:53 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -344,7 +344,7 @@ zend_hash_find(classes, mysqli_base_class-name, mysqli_base_class-name_length + 1, (void **) intern-prop_handler); - zend_object_std_init(intern-std, class_type TSRMLS_CC); + zend_object_std_init(intern-zo, class_type TSRMLS_CC); zend_hash_copy(intern-zo.properties, class_type-default_properties, (copy_ctor_func_t) zval_add_ref, (void *) tmp, sizeof(zval *)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c
iliaa Wed Mar 1 18:37:11 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/mysqli mysqli.c Log: Remove no longer needed check (checked at a higher level now). http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/mysqli.c?r1=1.72.2.9r2=1.72.2.10diff_format=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.72.2.9 php-src/ext/mysqli/mysqli.c:1.72.2.10 --- php-src/ext/mysqli/mysqli.c:1.72.2.9Thu Feb 16 16:03:27 2006 +++ php-src/ext/mysqli/mysqli.c Wed Mar 1 18:37:11 2006 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.72.2.9 2006/02/16 16:03:27 iliaa Exp $ + $Id: mysqli.c,v 1.72.2.10 2006/03/01 18:37:11 iliaa Exp $ */ #ifdef HAVE_CONFIG_H @@ -198,11 +198,6 @@ ret = FAILURE; obj = (mysqli_object *)zend_objects_get_address(object TSRMLS_CC); - /* object was already destroyed */ - if (!obj-ptr) { - retval = EG(uninitialized_zval_ptr); - return(retval); - } if (member-type != IS_STRING) { tmp_member = *member; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c mysqli_api.c /ext/mysqli/tests bug35759.phpt
andrey Thu Dec 22 18:11:39 2005 EDT Added files: (Branch: PHP_5_1) /php-src/ext/mysqli/tests bug35759.phpt Modified files: /php-src/ext/mysqli mysqli.c mysqli_api.c Log: fix for bug# 35759 (mysqli_stmt_bind_result() makes huge allocation when column empty) #this shows some leaks now, which has to be investigated but closes the #bug report. http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/mysqli.c?r1=1.72.2.5r2=1.72.2.6diff_format=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.72.2.5 php-src/ext/mysqli/mysqli.c:1.72.2.6 --- php-src/ext/mysqli/mysqli.c:1.72.2.5Tue Nov 15 14:28:40 2005 +++ php-src/ext/mysqli/mysqli.c Thu Dec 22 18:11:39 2005 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.72.2.5 2005/11/15 14:28:40 dmitry Exp $ + $Id: mysqli.c,v 1.72.2.6 2005/12/22 18:11:39 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -155,11 +155,11 @@ MY_STMT *stmt = (MY_STMT *)my_res-ptr; php_clear_stmt_bind(stmt); } - } else if (instanceof_function(intern-zo.ce, mysqli_result_class_entry TSRMLS_CC)) { /* stmt object */ + } else if (instanceof_function(intern-zo.ce, mysqli_result_class_entry TSRMLS_CC)) { /* result object */ if (my_res my_res-ptr) { mysql_free_result(my_res-ptr); } - } else if (instanceof_function(intern-zo.ce, mysqli_warning_class_entry TSRMLS_CC)) { /* stmt object */ + } else if (instanceof_function(intern-zo.ce, mysqli_warning_class_entry TSRMLS_CC)) { /* warning object */ if (my_res my_res-ptr) { php_clear_warnings((MYSQLI_WARNING *)my_res-info); } @@ -459,7 +459,7 @@ zend_hash_init(mysqli_driver_properties, 0, NULL, NULL, 1); MYSQLI_ADD_PROPERTIES(mysqli_driver_properties, mysqli_driver_property_entries); zend_hash_add(classes, ce-name, ce-name_length+1, mysqli_driver_properties, sizeof(mysqli_driver_properties), NULL); -ce-ce_flags |= ZEND_ACC_FINAL_CLASS; + ce-ce_flags |= ZEND_ACC_FINAL_CLASS; REGISTER_MYSQLI_CLASS_ENTRY(mysqli, mysqli_link_class_entry, mysqli_link_methods); ce = mysqli_link_class_entry; @@ -469,7 +469,7 @@ REGISTER_MYSQLI_CLASS_ENTRY(mysqli_warning, mysqli_warning_class_entry, mysqli_warning_methods); ce = mysqli_warning_class_entry; -ce-ce_flags |= ZEND_ACC_FINAL_CLASS | ZEND_ACC_PROTECTED; + ce-ce_flags |= ZEND_ACC_FINAL_CLASS | ZEND_ACC_PROTECTED; zend_hash_init(mysqli_warning_properties, 0, NULL, NULL, 1); MYSQLI_ADD_PROPERTIES(mysqli_warning_properties, mysqli_warning_property_entries); zend_hash_add(classes, ce-name, ce-name_length+1, mysqli_warning_properties, sizeof(mysqli_warning_properties), NULL); http://cvs.php.net/viewcvs.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.10r2=1.118.2.11diff_format=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.118.2.10 php-src/ext/mysqli/mysqli_api.c:1.118.2.11 --- php-src/ext/mysqli/mysqli_api.c:1.118.2.10 Thu Dec 1 14:12:55 2005 +++ php-src/ext/mysqli/mysqli_api.c Thu Dec 22 18:11:39 2005 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_api.c,v 1.118.2.10 2005/12/01 14:12:55 andrey Exp $ + $Id: mysqli_api.c,v 1.118.2.11 2005/12/22 18:11:39 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -323,20 +323,26 @@ #ifdef FIELD_TYPE_NEWDECIMAL case MYSQL_TYPE_NEWDECIMAL: #endif + { + ulong tmp; stmt-result.buf[ofs].type = IS_STRING; /* If the user has called $stmt-store_result() then we have asked max_length to be updated. this is done only for BLOBS because we don't want to allocate big chunkgs of memory 2^16 or 2^24 */ - if (stmt-stmt-fields[ofs].max_length == 0) { + if (stmt-stmt-fields[ofs].max_length == 0 + !mysql_stmt_attr_get(stmt-stmt, STMT_ATTR_UPDATE_MAX_LENGTH, tmp) !tmp) + { stmt-result.buf[ofs].buflen = (stmt-stmt-fields) ? (stmt-stmt-fields[ofs].length) ? stmt-stmt-fields[ofs].length + 1: 256: 256; } else { /*
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c /ext/xmlreader php_xmlreader.c /ext/xsl php_xsl.c
dmitry Tue Nov 15 09:28:41 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/xslphp_xsl.c /php-src/ext/mysqli mysqli.c /php-src/ext/xmlreader php_xmlreader.c Log: Allow recursive calls to __get/__set for different properties http://cvs.php.net/diff.php/php-src/ext/xsl/php_xsl.c?r1=1.32.2.1r2=1.32.2.2ty=u Index: php-src/ext/xsl/php_xsl.c diff -u php-src/ext/xsl/php_xsl.c:1.32.2.1 php-src/ext/xsl/php_xsl.c:1.32.2.2 --- php-src/ext/xsl/php_xsl.c:1.32.2.1 Mon Nov 14 17:03:02 2005 +++ php-src/ext/xsl/php_xsl.c Tue Nov 15 09:28:38 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_xsl.c,v 1.32.2.1 2005/11/14 22:03:02 tony2001 Exp $ */ +/* $Id: php_xsl.c,v 1.32.2.2 2005/11/15 14:28:38 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -120,8 +120,7 @@ intern = emalloc(sizeof(xsl_object)); intern-std.ce = class_type; - intern-std.in_get = 0; - intern-std.in_set = 0; + intern-std.guards = NULL; intern-ptr = NULL; intern-prop_handler = NULL; intern-parameter = NULL; http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.72.2.4r2=1.72.2.5ty=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.72.2.4 php-src/ext/mysqli/mysqli.c:1.72.2.5 --- php-src/ext/mysqli/mysqli.c:1.72.2.4Wed Oct 12 09:31:46 2005 +++ php-src/ext/mysqli/mysqli.c Tue Nov 15 09:28:40 2005 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.72.2.4 2005/10/12 13:31:46 tony2001 Exp $ + $Id: mysqli.c,v 1.72.2.5 2005/11/15 14:28:40 dmitry Exp $ */ #ifdef HAVE_CONFIG_H @@ -344,8 +344,7 @@ intern = emalloc(sizeof(mysqli_object)); memset(intern, 0, sizeof(mysqli_object)); intern-zo.ce = class_type; - intern-zo.in_get = 0; - intern-zo.in_set = 0; + intern-zo.guards = NULL; intern-ptr = NULL; intern-valid = 0; intern-prop_handler = NULL; http://cvs.php.net/diff.php/php-src/ext/xmlreader/php_xmlreader.c?r1=1.13.2.2r2=1.13.2.3ty=u Index: php-src/ext/xmlreader/php_xmlreader.c diff -u php-src/ext/xmlreader/php_xmlreader.c:1.13.2.2 php-src/ext/xmlreader/php_xmlreader.c:1.13.2.3 --- php-src/ext/xmlreader/php_xmlreader.c:1.13.2.2 Mon Nov 14 17:03:02 2005 +++ php-src/ext/xmlreader/php_xmlreader.c Tue Nov 15 09:28:40 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_xmlreader.c,v 1.13.2.2 2005/11/14 22:03:02 tony2001 Exp $ */ +/* $Id: php_xmlreader.c,v 1.13.2.3 2005/11/15 14:28:40 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -352,8 +352,7 @@ intern = emalloc(sizeof(xmlreader_object)); intern-std.ce = class_type; - intern-std.in_get = 0; - intern-std.in_set = 0; + intern-std.guards = NULL; intern-ptr = NULL; intern-input = NULL; intern-schema = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c /ext/xmlreader php_xmlreader.c /ext/xsl php_xsl.c
Don't you think it's better to use memset/ecalloc in these cases - so we don't need to patch them each time we have some change? DSdmitry Tue Nov 15 09:28:41 2005 EDT DS DS Modified files: (Branch: PHP_5_1) DS/php-src/ext/xslphp_xsl.c DS/php-src/ext/mysqli mysqli.c DS/php-src/ext/xmlreader php_xmlreader.c DS Log: DS Allow recursive calls to __get/__set for different properties DS DS-/* $Id: php_xsl.c,v 1.32.2.1 2005/11/14 22:03:02 tony2001 Exp $ */ DS+/* $Id: php_xsl.c,v 1.32.2.2 2005/11/15 14:28:38 dmitry Exp $ */ DS DS #ifdef HAVE_CONFIG_H DS #include config.h DS@@ -120,8 +120,7 @@ DS DSintern = emalloc(sizeof(xsl_object)); DSintern-std.ce = class_type; DS- intern-std.in_get = 0; DS- intern-std.in_set = 0; DS+ intern-std.guards = NULL; DSintern-ptr = NULL; DSintern-prop_handler = NULL; DSintern-parameter = NULL; -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c /ext/xmlreaderphp_xmlreader.c /ext/xsl php_xsl.c
May be it make sense, but I hope no more modifications will required. Dmitry. -Original Message- From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 15, 2005 5:37 PM To: Dmitry Stogov Cc: php-cvs@lists.php.net Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c /ext/xmlreaderphp_xmlreader.c /ext/xsl php_xsl.c Don't you think it's better to use memset/ecalloc in these cases - so we don't need to patch them each time we have some change? DSdmitryTue Nov 15 09:28:41 2005 EDT DS DS Modified files: (Branch: PHP_5_1) DS/php-src/ext/xsl php_xsl.c DS/php-src/ext/mysqli mysqli.c DS/php-src/ext/xmlreaderphp_xmlreader.c DS Log: DS Allow recursive calls to __get/__set for different properties DS DS-/* $Id: php_xsl.c,v 1.32.2.1 2005/11/14 22:03:02 tony2001 Exp $ */ DS+/* $Id: php_xsl.c,v 1.32.2.2 2005/11/15 14:28:38 dmitry Exp $ */ DS DS #ifdef HAVE_CONFIG_H DS #include config.h DS@@ -120,8 +120,7 @@ DS DS intern = emalloc(sizeof(xsl_object)); DS intern-std.ce = class_type; DS- intern-std.in_get = 0; DS- intern-std.in_set = 0; DS+ intern-std.guards = NULL; DS intern-ptr = NULL; DS intern-prop_handler = NULL; DS intern-parameter = NULL; -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c /ext/xmlreaderphp_xmlreader.c /ext/xsl php_xsl.c
DSMay be it make sense, but I hope no more modifications will required. Well, you know how it is - we always hope it's the last time we need to modify it, until the next time comes ;) -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c mysqli_warning.c
tony2001Wed Oct 12 09:31:48 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/mysqli mysqli.c mysqli_warning.c Log: fix TS build http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.72.2.3r2=1.72.2.4ty=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.72.2.3 php-src/ext/mysqli/mysqli.c:1.72.2.4 --- php-src/ext/mysqli/mysqli.c:1.72.2.3Mon Oct 10 16:02:59 2005 +++ php-src/ext/mysqli/mysqli.c Wed Oct 12 09:31:46 2005 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.72.2.3 2005/10/10 20:02:59 tony2001 Exp $ + $Id: mysqli.c,v 1.72.2.4 2005/10/12 13:31:46 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -661,7 +661,7 @@ switch (ZEND_NUM_ARGS()) { case 1: /* mysql_stmt_init */ - if (zend_parse_parameters(1, O, mysql_link, mysqli_link_class_entry)==FAILURE) { + if (zend_parse_parameters(1 TSRMLS_CC, O, mysql_link, mysqli_link_class_entry)==FAILURE) { return; } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, mysql_link, mysqli_link); @@ -671,7 +671,7 @@ stmt-stmt = mysql_stmt_init(mysql-mysql); break; case 2: - if (zend_parse_parameters(2, Os, mysql_link, mysqli_link_class_entry, statement, stmt_len)==FAILURE) { + if (zend_parse_parameters(2 TSRMLS_CC, Os, mysql_link, mysqli_link_class_entry, statement, stmt_len)==FAILURE) { return; } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, mysql_link, mysqli_link); @@ -715,12 +715,12 @@ switch (ZEND_NUM_ARGS()) { case 1: - if (zend_parse_parameters(1, O, mysql_link, mysqli_link_class_entry)==FAILURE) { + if (zend_parse_parameters(1 TSRMLS_CC, O, mysql_link, mysqli_link_class_entry)==FAILURE) { return; } break; case 2: - if (zend_parse_parameters(2, Ol, mysql_link, mysqli_link_class_entry, resmode)==FAILURE) { + if (zend_parse_parameters(2 TSRMLS_CC, Ol, mysql_link, mysqli_link_class_entry, resmode)==FAILURE) { return; } break; http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_warning.c?r1=1.5.2.2r2=1.5.2.3ty=u Index: php-src/ext/mysqli/mysqli_warning.c diff -u php-src/ext/mysqli/mysqli_warning.c:1.5.2.2 php-src/ext/mysqli/mysqli_warning.c:1.5.2.3 --- php-src/ext/mysqli/mysqli_warning.c:1.5.2.2 Mon Oct 10 16:03:00 2005 +++ php-src/ext/mysqli/mysqli_warning.c Wed Oct 12 09:31:46 2005 @@ -175,7 +175,7 @@ if (ZEND_NUM_ARGS() != 1) { WRONG_PARAM_COUNT; } - if (zend_parse_parameters(1, o, z)==FAILURE) { + if (zend_parse_parameters(1 TSRMLS_CC, o, z)==FAILURE) { return; } obj = (mysqli_object *)zend_object_store_get_object(z TSRMLS_CC);\ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c mysqli_fe.c /ext/mysqli/tests 003.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010.phpt 020.phpt 023.phpt 024.phpt 025.phpt 026.phpt 042.phpt 060.phpt
georg Sat Oct 8 11:08:08 2005 EDT Added files: (Branch: PHP_5_1) /php-src/ext/mysqli/tests bug34785.phpt Modified files: /php-src/ext/mysqli mysqli.c mysqli_fe.c /php-src/ext/mysqli/tests 003.phpt 006.phpt 007.phpt 008.phpt 009.phpt 010.phpt 020.phpt 023.phpt 024.phpt 025.phpt 026.phpt 042.phpt 060.phpt 065.phpt bug32405.phpt Log: fix for bug 34785: added support for parent::__construct (mysqli_statement and mysqli_resultset) fixed failed testcases when sql_mode is in effect http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.72.2.1r2=1.72.2.2ty=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.72.2.1 php-src/ext/mysqli/mysqli.c:1.72.2.2 --- php-src/ext/mysqli/mysqli.c:1.72.2.1Tue Sep 13 05:20:18 2005 +++ php-src/ext/mysqli/mysqli.c Sat Oct 8 11:08:03 2005 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.72.2.1 2005/09/13 09:20:18 tony2001 Exp $ + $Id: mysqli.c,v 1.72.2.2 2005/10/08 15:08:03 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -143,25 +143,23 @@ if (instanceof_function(intern-zo.ce, mysqli_link_class_entry TSRMLS_CC)) { if (my_res my_res-ptr) { MY_MYSQL *mysql = (MY_MYSQL *)my_res-ptr; - if (mysql-mysql) { mysql_close(mysql-mysql); } - php_clear_mysql(mysql); efree(mysql); - my_res-ptr = NULL; } - } else if (intern-zo.ce == mysqli_stmt_class_entry) { /* stmt object */ + } else if (instanceof_function(intern-zo.ce, mysqli_stmt_class_entry TSRMLS_CC)) { /* stmt object */ if (my_res my_res-ptr) { - php_clear_stmt_bind((MY_STMT *)my_res-ptr); + MY_STMT *stmt = (MY_STMT *)my_res-ptr; + php_clear_stmt_bind(stmt); } - } else if (intern-zo.ce == mysqli_result_class_entry) { /* result object */ + } else if (instanceof_function(intern-zo.ce, mysqli_result_class_entry TSRMLS_CC)) { /* stmt object */ if (my_res my_res-ptr) { mysql_free_result(my_res-ptr); } - } else if (intern-zo.ce == mysqli_warning_class_entry) { /* warning object */ + } else if (instanceof_function(intern-zo.ce, mysqli_warning_class_entry TSRMLS_CC)) { /* stmt object */ if (my_res my_res-ptr) { php_clear_warnings((MYSQLI_WARNING *)my_res-info); } http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_fe.c?r1=1.49r2=1.49.2.1ty=u Index: php-src/ext/mysqli/mysqli_fe.c diff -u php-src/ext/mysqli/mysqli_fe.c:1.49 php-src/ext/mysqli/mysqli_fe.c:1.49.2.1 --- php-src/ext/mysqli/mysqli_fe.c:1.49 Wed Aug 3 10:07:30 2005 +++ php-src/ext/mysqli/mysqli_fe.c Sat Oct 8 11:08:03 2005 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_fe.c,v 1.49 2005/08/03 14:07:30 sniper Exp $ + $Id: mysqli_fe.c,v 1.49.2.1 2005/10/08 15:08:03 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -244,6 +244,7 @@ * Every user visible function must have an entry in mysqli_result_functions[]. */ function_entry mysqli_result_methods[] = { + PHP_FALIAS(mysqli_result, mysqli_result_construct, NULL) PHP_FALIAS(close,mysqli_free_result,NULL) PHP_FALIAS(free,mysqli_free_result,NULL) PHP_FALIAS(data_seek,mysqli_data_seek,NULL) @@ -266,6 +267,7 @@ * Every user visible function must have an entry in mysqli_stmt_functions[]. */ function_entry mysqli_stmt_methods[] = { + PHP_FALIAS(mysqli_stmt, mysqli_stmt_construct, NULL) PHP_FALIAS(attr_get,mysqli_stmt_attr_get,NULL) PHP_FALIAS(attr_set,mysqli_stmt_attr_set,NULL) PHP_FALIAS(bind_param,mysqli_stmt_bind_param,second_arg_force_by_ref_rest) http://cvs.php.net/diff.php/php-src/ext/mysqli/tests/003.phpt?r1=1.5r2=1.5.2.1ty=u Index: php-src/ext/mysqli/tests/003.phpt diff -u php-src/ext/mysqli/tests/003.phpt:1.5 php-src/ext/mysqli/tests/003.phpt:1.5.2.1 --- php-src/ext/mysqli/tests/003.phpt:1.5 Sat Dec 4 03:50:33 2004 +++ php-src/ext/mysqli/tests/003.phpt Sat Oct 8 11:08:07 2005 @@ -7,9 +7,9 @@ include connect.inc; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd); + $link = mysqli_connect($host, $user, $passwd, test); - mysqli_select_db($link, test); + mysqli_query($link, SET sql_mode='');
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli.c
tony2001Tue Sep 13 05:20:18 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/mysqli mysqli.c Log: fix #34450 (Segfault when calling mysqli_close() in destructor) http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.72r2=1.72.2.1ty=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.72 php-src/ext/mysqli/mysqli.c:1.72.2.1 --- php-src/ext/mysqli/mysqli.c:1.72Wed Aug 3 10:07:30 2005 +++ php-src/ext/mysqli/mysqli.c Tue Sep 13 05:20:18 2005 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.72 2005/08/03 14:07:30 sniper Exp $ + $Id: mysqli.c,v 1.72.2.1 2005/09/13 09:20:18 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -133,9 +133,11 @@ static void mysqli_objects_destroy_object(void *object, zend_object_handle handle TSRMLS_DC) { mysqli_object *intern = (mysqli_object *)object; - MYSQLI_RESOURCE *my_res = (MYSQLI_RESOURCE *)intern-ptr; + MYSQLI_RESOURCE *my_res; zend_objects_destroy_object(object, handle TSRMLS_CC); + + my_res = (MYSQLI_RESOURCE *)intern-ptr; /* link object */ if (instanceof_function(intern-zo.ce, mysqli_link_class_entry TSRMLS_CC)) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php