[PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
andrey Tue Jun 10 10:46:01 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysql php_mysql.c Log: proto fixes Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174.2.17 php4/ext/mysql/php_mysql.c:1.174.2.18 --- php4/ext/mysql/php_mysql.c:1.174.2.17 Sat May 31 02:54:53 2003 +++ php4/ext/mysql/php_mysql.c Tue Jun 10 10:46:00 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.17 2003/05/31 06:54:53 georg Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.18 2003/06/10 14:46:00 andrey Exp $ */ /* TODO: * @@ -1710,7 +1710,7 @@ /* }}} */ -/* {{{ proto mixed mysql_result(int result, int row [, mixed field]) +/* {{{ proto mixed mysql_result(resource result, int row [, mixed field]) Gets result data */ PHP_FUNCTION(mysql_result) { @@ -1813,7 +1813,7 @@ /* }}} */ -/* {{{ proto int mysql_num_rows(int result) +/* {{{ proto int mysql_num_rows(resource result) Gets number of rows in a result */ PHP_FUNCTION(mysql_num_rows) { @@ -1832,7 +1832,7 @@ } /* }}} */ -/* {{{ proto int mysql_num_fields(int result) +/* {{{ proto int mysql_num_fields(resource result) Gets number of fields in a result */ PHP_FUNCTION(mysql_num_fields) { @@ -1939,7 +1939,7 @@ } /* }}} */ -/* {{{ proto array mysql_fetch_row(int result) +/* {{{ proto array mysql_fetch_row(resource result) Gets a result row as an enumerated array */ PHP_FUNCTION(mysql_fetch_row) { @@ -1948,7 +1948,7 @@ /* }}} */ -/* {{{ proto object mysql_fetch_object(int result [, int result_type]) +/* {{{ proto object mysql_fetch_object(resource result [, int result_type]) Fetch a result row as an object */ PHP_FUNCTION(mysql_fetch_object) { @@ -1961,7 +1961,7 @@ /* }}} */ -/* {{{ proto array mysql_fetch_array(int result [, int result_type]) +/* {{{ proto array mysql_fetch_array(resource result [, int result_type]) Fetch a result row as an array (associative, numeric or both) */ PHP_FUNCTION(mysql_fetch_array) { @@ -1970,7 +1970,7 @@ /* }}} */ -/* {{{ proto array mysql_fetch_assoc(int result) +/* {{{ proto array mysql_fetch_assoc(resource result) Fetch a result row as an associative array */ PHP_FUNCTION(mysql_fetch_assoc) { @@ -1978,7 +1978,7 @@ } /* }}} */ -/* {{{ proto bool mysql_data_seek(int result, int row_number) +/* {{{ proto bool mysql_data_seek(resource result, int row_number) Move internal result pointer */ PHP_FUNCTION(mysql_data_seek) { @@ -2002,7 +2002,7 @@ /* }}} */ -/* {{{ proto array mysql_fetch_lengths(int result) +/* {{{ proto array mysql_fetch_lengths(resource result) Gets max data size of each column in a result */ PHP_FUNCTION(mysql_fetch_lengths) { @@ -2088,7 +2088,7 @@ } /* }}} */ -/* {{{ proto object mysql_fetch_field(int result [, int field_offset]) +/* {{{ proto object mysql_fetch_field(resource result [, int field_offset]) Gets column information from a result and return as an object */ PHP_FUNCTION(mysql_fetch_field) { @@ -2145,7 +2145,7 @@ /* }}} */ -/* {{{ proto bool mysql_field_seek(int result, int field_offset) +/* {{{ proto bool mysql_field_seek(resource result, int field_offset) Sets result pointer to a specific field offset */ PHP_FUNCTION(mysql_field_seek) { @@ -2302,7 +2302,7 @@ } /* }}} */ -/* {{{ proto string mysql_field_name(int result, int field_index) +/* {{{ proto string mysql_field_name(resource result, int field_index) Gets the name of the specified field in a result */ PHP_FUNCTION(mysql_field_name) { @@ -2311,7 +2311,7 @@ /* }}} */ -/* {{{ proto string mysql_field_table(int result, int field_offset) +/* {{{ proto string mysql_field_table(resource result, int field_offset) Gets name of the table the specified field is in */ PHP_FUNCTION(mysql_field_table) { @@ -2320,7 +2320,7 @@ /* }}} */ -/* {{{ proto int mysql_field_len(int result, int field_offset) +/* {{{ proto int mysql_field_len(resource result, int field_offset) Returns the length of the specified field */ PHP_FUNCTION(mysql_field_len) { @@ -2329,7 +2329,7 @@ /* }}} */ -/* {{{ proto string mysql_field_type(int result, int field_offset) +/* {{{ proto string mysql_field_type(resource result, int field_offset) Gets the type of the specified field in a result */ PHP_FUNCTION(mysql_field_type) { @@ -2338,7 +2338,7 @@ /* }}} */ -/* {{{ proto string mysql_field_flags(int result, int field_offset) +/* {{{ proto string mysql_field_flags(resource result, int field_offset) Gets the flags associated with the specified field in a result */ PHP_FUNCTION(mysql_field_flags) { @@ -2347,7 +2347,7 @@ /* }}} */ -/* {{{ proto bool mysql_free_result(int result) +/* {{{ proto bool mysql_free_result(resource result) Free result memory */ PHP_FUNCTION(mysql_free_result) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
Why isn't this in php5 ? --Jani On Sat, 31 May 2003, Georg Richter wrote: georg Sat May 31 02:54:53 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysqlphp_mysql.c Log: suggestion by Wez :) Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174.2.16 php4/ext/mysql/php_mysql.c:1.174.2.17 --- php4/ext/mysql/php_mysql.c:1.174.2.16 Fri May 30 15:16:58 2003 +++ php4/ext/mysql/php_mysql.c Sat May 31 02:54:53 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.16 2003/05/30 19:16:58 georg Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.17 2003/05/31 06:54:53 georg Exp $ */ /* TODO: * @@ -562,7 +562,7 @@ break; } /* disable local infile option for open_basedir */ - if (PG(open_basedir)) { + if (PG(open_basedir) strlen(PG(open_basedir))) { client_flags ^= CLIENT_LOCAL_FILES; } -- https://www.paypal.com/xclick/[EMAIL PROTECTED]no_note=1tax=0currency_code=EUR -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
georg Fri May 30 09:00:17 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysql php_mysql.c Log: fixed #23779 (CLIENT_LOCAL_FILES with open_basedir) Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174.2.13 php4/ext/mysql/php_mysql.c:1.174.2.14 --- php4/ext/mysql/php_mysql.c:1.174.2.13 Wed May 28 12:18:14 2003 +++ php4/ext/mysql/php_mysql.c Fri May 30 09:00:17 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.13 2003/05/28 16:18:14 rasmus Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.14 2003/05/30 13:00:17 georg Exp $ */ /* TODO: * @@ -557,6 +557,11 @@ WRONG_PARAM_COUNT; break; } + /* disable local infile option for open_basedir */ + if (strlen(PG(open_basedir))) { + client_flags ^= CLIENT_LOCAL_FILES; + } + if (z_host) { SEPARATE_ZVAL(z_host); /* We may modify z_host if it contains a port, separate */ convert_to_string_ex(z_host); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
iliaa Fri May 30 10:08:39 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysql php_mysql.c Log: MFH Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174.2.14 php4/ext/mysql/php_mysql.c:1.174.2.15 --- php4/ext/mysql/php_mysql.c:1.174.2.14 Fri May 30 09:00:17 2003 +++ php4/ext/mysql/php_mysql.c Fri May 30 10:08:38 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.14 2003/05/30 13:00:17 georg Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.15 2003/05/30 14:08:38 iliaa Exp $ */ /* TODO: * @@ -525,6 +525,7 @@ } convert_to_string_ex(z_user); convert_to_string_ex(z_passwd); + convert_to_boolean_ex(z_new_link); user = Z_STRVAL_PP(z_user); passwd = Z_STRVAL_PP(z_passwd); new_link = Z_BVAL_PP(z_new_link); @@ -535,6 +536,7 @@ } convert_to_string_ex(z_user); convert_to_string_ex(z_passwd); + convert_to_long_ex(z_client_flags); user = Z_STRVAL_PP(z_user); passwd = Z_STRVAL_PP(z_passwd); client_flags = Z_LVAL_PP(z_client_flags); @@ -547,6 +549,8 @@ } convert_to_string_ex(z_user); convert_to_string_ex(z_passwd); + convert_to_boolean_ex(z_new_link); + convert_to_long_ex(z_client_flags); user = Z_STRVAL_PP(z_user); passwd = Z_STRVAL_PP(z_passwd); new_link = Z_BVAL_PP(z_new_link); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
georg Fri May 30 15:16:59 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysql php_mysql.c Log: better to test next time with the right version :) Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174.2.15 php4/ext/mysql/php_mysql.c:1.174.2.16 --- php4/ext/mysql/php_mysql.c:1.174.2.15 Fri May 30 10:08:38 2003 +++ php4/ext/mysql/php_mysql.c Fri May 30 15:16:58 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.15 2003/05/30 14:08:38 iliaa Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.16 2003/05/30 19:16:58 georg Exp $ */ /* TODO: * @@ -562,7 +562,7 @@ break; } /* disable local infile option for open_basedir */ - if (strlen(PG(open_basedir))) { + if (PG(open_basedir)) { client_flags ^= CLIENT_LOCAL_FILES; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
georg Sat May 31 02:54:53 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysql php_mysql.c Log: suggestion by Wez :) Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174.2.16 php4/ext/mysql/php_mysql.c:1.174.2.17 --- php4/ext/mysql/php_mysql.c:1.174.2.16 Fri May 30 15:16:58 2003 +++ php4/ext/mysql/php_mysql.c Sat May 31 02:54:53 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.16 2003/05/30 19:16:58 georg Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.17 2003/05/31 06:54:53 georg Exp $ */ /* TODO: * @@ -562,7 +562,7 @@ break; } /* disable local infile option for open_basedir */ - if (PG(open_basedir)) { + if (PG(open_basedir) strlen(PG(open_basedir))) { client_flags ^= CLIENT_LOCAL_FILES; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
rasmus Wed May 28 12:18:14 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysql php_mysql.c Log: I see no reason not to allow people to set the timeout on a mysql_connect from inside a script with ini_set(). We allow user-settable timeouts on other socket connections so having this as a system-settable only directive doesn't make much sense to me. Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174.2.12 php4/ext/mysql/php_mysql.c:1.174.2.13 --- php4/ext/mysql/php_mysql.c:1.174.2.12 Fri May 16 15:07:57 2003 +++ php4/ext/mysql/php_mysql.c Wed May 28 12:18:14 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.12 2003/05/16 19:07:57 derick Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.13 2003/05/28 16:18:14 rasmus Exp $ */ /* TODO: * @@ -315,7 +315,7 @@ STD_PHP_INI_ENTRY(mysql.default_password, NULL, PHP_INI_ALL, OnUpdateString, default_password, zend_mysql_globals, mysql_globals) PHP_INI_ENTRY(mysql.default_port, NULL, PHP_INI_ALL,OnMySQLPort) STD_PHP_INI_ENTRY(mysql.default_socket, NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_socket, zend_mysql_globals, mysql_globals) - STD_PHP_INI_ENTRY(mysql.connect_timeout, -1, PHP_INI_SYSTEM, OnUpdateInt,connect_timeout, zend_mysql_globals, mysql_globals) + STD_PHP_INI_ENTRY(mysql.connect_timeout, -1, PHP_INI_ALL, OnUpdateInt,connect_timeout,zend_mysql_globals, mysql_globals) STD_PHP_INI_BOOLEAN(mysql.trace_mode, 0,PHP_INI_ALL, OnUpdateInt,trace_mode, zend_mysql_globals, mysql_globals) PHP_INI_END() /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
georg Wed Jan 8 06:15:14 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysql php_mysql.c Log: fixed bug 21498 Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174.2.7 php4/ext/mysql/php_mysql.c:1.174.2.8 --- php4/ext/mysql/php_mysql.c:1.174.2.7Mon Jan 6 09:12:40 2003 +++ php4/ext/mysql/php_mysql.c Wed Jan 8 06:15:12 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.7 2003/01/06 14:12:40 georg Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.8 2003/01/08 11:15:12 georg Exp $ */ /* TODO: * @@ -663,11 +663,6 @@ /* ensure that the link did not die */ #if MYSQL_VERSION_ID 32230 /* Use mysql_ping to ensure link is alive (and to reconnect if needed) */ if (mysql_ping(le-ptr)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Link to server lost, unable to reconnect); - zend_hash_del(EG(persistent_list), hashed_details, hashed_details_length+1); - efree(hashed_details); - MYSQL_DO_CONNECT_RETURN_FALSE(); - } #else /* Use mysql_stat() to check if server is alive */ handler=signal(SIGPIPE, SIG_IGN); #if defined(HAVE_MYSQL_ERRNO) defined(CR_SERVER_GONE_ERROR) @@ -677,6 +672,7 @@ if (!strcasecmp(mysql_stat(le-ptr), mysql server has gone away)) { /* the link died */ #endif signal(SIGPIPE, handler); +#endif /* end mysql_ping */ #if MYSQL_VERSION_ID 32199 /* this lets us set the port number */ if (mysql_real_connect(le-ptr, host, user, passwd, NULL, port, socket, client_flags)==NULL) { #else @@ -688,8 +684,9 @@ MYSQL_DO_CONNECT_RETURN_FALSE(); } } +#if MYSQL_VERSION_ID 32231 signal(SIGPIPE, handler); -#endif /* end Use mysql_ping ... */ +#endif mysql = (php_mysql_conn *) le-ptr; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
georg Mon Jan 6 09:12:41 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysql php_mysql.c Log: fixed a missing (Thx to Sebastian Bergmann Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174.2.6 php4/ext/mysql/php_mysql.c:1.174.2.7 --- php4/ext/mysql/php_mysql.c:1.174.2.6Sun Jan 5 16:11:39 2003 +++ php4/ext/mysql/php_mysql.c Mon Jan 6 09:12:40 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.6 2003/01/05 21:11:39 derick Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.7 2003/01/06 14:12:40 georg Exp $ */ /* TODO: * @@ -1001,7 +1001,7 @@ CHECK_LINK(id); } - ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, MySQL-Link, le_link, le_plink); + ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, MySQL-Link, +le_link, le_plink); if ((str = (char *)mysql_info(mysql-conn))) { RETURN_STRING(str,1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
georg Thu Dec 26 08:48:00 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysql php_mysql.c Log: fixed some compiler warnings when using external libmysqlclient 4.x Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174.2.3 php4/ext/mysql/php_mysql.c:1.174.2.4 --- php4/ext/mysql/php_mysql.c:1.174.2.3Thu Dec 5 15:02:21 2002 +++ php4/ext/mysql/php_mysql.c Thu Dec 26 08:47:59 2002 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.3 2002/12/05 20:02:21 helly Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.4 2002/12/26 13:47:59 georg Exp $ */ /* TODO: * @@ -889,7 +889,7 @@ WRONG_PARAM_COUNT; } - RETURN_STRING(mysql_get_client_info(),1); + RETURN_STRING((char *)mysql_get_client_info(),1); } /* }}} */ @@ -919,7 +919,7 @@ ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, MySQL-Link, le_link, le_plink); - RETURN_STRING(mysql_get_host_info(mysql-conn),1); + RETURN_STRING((char *)mysql_get_host_info(mysql-conn),1); } /* }}} */ @@ -979,7 +979,7 @@ ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, MySQL-Link, le_link, le_plink); - RETURN_STRING(mysql_get_server_info(mysql-conn),1); + RETURN_STRING((char *)mysql_get_server_info(mysql-conn),1); } /* }}} */ @@ -1003,7 +1003,7 @@ ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, MySQL-Link, le_link, le_plink); - if ((str = mysql_info(mysql-conn))) { + if ((str = (char *)mysql_info(mysql-conn))) { RETURN_STRING(str,1); } else { RETURN_FALSE; @@ -1051,7 +1051,7 @@ } ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, MySQL-Link, le_link, le_plink); - RETURN_STRING(mysql_stat(mysql-conn), 1); + RETURN_STRING((char *)mysql_stat(mysql-conn), 1); } /* }}} */ @@ -1542,7 +1542,7 @@ ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, MySQL-Link, le_link, le_plink); - RETURN_STRING(mysql_error(mysql-conn), 1); + RETURN_STRING((char *)mysql_error(mysql-conn), 1); } /* }}} */ @@ -1857,7 +1857,6 @@ MYSQL_ROW mysql_row; MYSQL_FIELD *mysql_field; mysql_row_length_type *mysql_row_lengths; - int num_fields; int i; if (ZEND_NUM_ARGS() expected_args) { @@ -1892,8 +1891,6 @@ RETURN_FALSE; } - num_fields = mysql_num_fields(mysql_result); - if (array_init(return_value)==FAILURE) { RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
helly Thu Dec 5 15:02:22 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysql php_mysql.c Log: MFH Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174.2.2 php4/ext/mysql/php_mysql.c:1.174.2.3 --- php4/ext/mysql/php_mysql.c:1.174.2.2Wed Nov 20 18:01:02 2002 +++ php4/ext/mysql/php_mysql.c Thu Dec 5 15:02:21 2002 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.2 2002/11/20 23:01:02 sniper Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.3 2002/12/05 20:02:21 helly Exp $ */ /* TODO: * @@ -663,7 +663,7 @@ /* ensure that the link did not die */ #if MYSQL_VERSION_ID 32230 /* Use mysql_ping to ensure link is alive (and to reconnect if needed) */ if (mysql_ping(le-ptr)) { - php_error(E_WARNING, %s: Link to server lost, unable to reconnect, get_active_function_name(TSRMLS_C)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, +Link to server lost, unable to reconnect); zend_hash_del(EG(persistent_list), hashed_details, hashed_details_length+1); efree(hashed_details); MYSQL_DO_CONNECT_RETURN_FALSE(); @@ -682,7 +682,7 @@ #else if (mysql_connect(le-ptr, host, user, passwd)==NULL) { #endif - php_error(E_WARNING, %s: Link to server lost, unable to reconnect, get_active_function_name(TSRMLS_C)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, +Link to server lost, unable to reconnect); zend_hash_del(EG(persistent_list), hashed_details, hashed_details_length+1); efree(hashed_details); MYSQL_DO_CONNECT_RETURN_FALSE(); @@ -988,7 +988,7 @@ PHP_FUNCTION(mysql_info) { zval **mysql_link; - int id; + int id = -1; char *str; php_mysql_conn *mysql; @@ -1192,8 +1192,7 @@ mysql_result = (MYSQL_RES *) zend_list_find(mysql-active_result_id, type); if (mysql_result type==le_result) { if (!mysql_eof(mysql_result)) { - php_error(E_NOTICE, %s(): Function called without first fetching all rows from a previous unbuffered query, - get_active_function_name(TSRMLS_C)); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, %s(): +Function called without first fetching all rows from a previous unbuffered query); while (mysql_fetch_row(mysql_result)); } zend_list_delete(mysql-active_result_id); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
sniper Wed Nov 20 18:01:03 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysql php_mysql.c Log: MFH, as requested by georg Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174.2.1 php4/ext/mysql/php_mysql.c:1.174.2.2 --- php4/ext/mysql/php_mysql.c:1.174.2.1Fri Nov 15 05:44:23 2002 +++ php4/ext/mysql/php_mysql.c Wed Nov 20 18:01:02 2002 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.1 2002/11/15 10:44:23 derick Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.2 2002/11/20 23:01:02 sniper Exp $ */ /* TODO: * @@ -231,6 +231,7 @@ MYSQL_RES *mysql_result = (MYSQL_RES *)rsrc-ptr; mysql_free_result(mysql_result); + MySG(result_allocated)--; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
derick Fri Nov 15 05:44:23 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mysql php_mysql.c Log: - MFH: removed restore_connection_defaults for pconnects (discussed on php-dev) bug #19529 closed bug #12513 reopened Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.174 php4/ext/mysql/php_mysql.c:1.174.2.1 --- php4/ext/mysql/php_mysql.c:1.174Wed Nov 13 03:54:34 2002 +++ php4/ext/mysql/php_mysql.c Fri Nov 15 05:44:23 2002 -18,7 +18,7 +--+ */ -/* $Id: php_mysql.c,v 1.174 2002/11/13 08:54:34 derick Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.1 2002/11/15 10:44:23 derick Exp $ */ /* TODO: * -222,49 +222,6 #define CHECK_LINK(link) { if (link==-1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, A link to the server could not be established); RETURN_FALSE; } } -/* {{{ _restore_connection_defaults - */ -static int _restore_connection_defaults(zend_rsrc_list_entry *rsrc TSRMLS_DC) -{ - php_mysql_conn *link; - charuser[128]; - charpasswd[128]; - - /* check if its a persistent link */ - if (Z_TYPE_P(rsrc) != le_plink) - return 0; - - link = (php_mysql_conn *) rsrc-ptr; - - /* Find the active result set and free it */ - if (link-active_result_id) { - int type; - MYSQL_RES *mysql_result; - - mysql_result = (MYSQL_RES *) zend_list_find(link-active_result_id, type); - if (mysql_result type==le_result) { - zend_list_delete(link-active_result_id); - link-active_result_id = 0; - } - } - - /* rollback possible transactions */ - mysql_query(link-conn, ROLLBACK); - - /* restore session variable autocommit to default (1) */ - mysql_query(link-conn, SET AUTOCOMMIT=1); - - /* unset the current selected db */ -#if MYSQL_VERSION_ID 32329 - strcpy (user, (char *)(link-conn)-user); - strcpy (passwd, (char *)(link-conn)-passwd); - mysql_change_user(link-conn, user, passwd, ); -#endif - - return 0; -} -/* }}} */ - /* {{{ _free_mysql_result * This wrapper is required since mysql_free_result() returns an integer, and * thus, cannot be used directly -446,8 +403,6 */ PHP_RSHUTDOWN_FUNCTION(mysql) { - zend_hash_apply(EG(persistent_list), (apply_func_t) _restore_connection_defaults TSRMLS_CC); - if (MySG(trace_mode)) { if (MySG(result_allocated)){ char tmp[128]; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php