cvs: php4(PHP_4_3) /ext/mysql php_mysql.c

From: Date: Thu, 10 Apr 2003 04:35:51 +0000
Subject: cvs: php4(PHP_4_3) /ext/mysql php_mysql.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-20205@lists.php.net to get a copy of this message
iliaa Thu Apr 10 00:35:51 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.8 php4/ext/mysql/php_mysql.c:1.174.2.9 --- php4/ext/mysql/php_mysql.c:1.174.2.8 Wed Jan 8 06:15:12 2003 +++ php4/ext/mysql/php_mysql.c Thu Apr 10 00:35:51 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.174.2.8 2003/01/08 11:15:12 georg Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.9 2003/04/10 04:35:51 iliaa Exp $ */ /* TODO: * @@ -1170,7 +1170,6 @@ { php_mysql_conn *mysql; MYSQL_RES *mysql_result; - char tmp[128]; ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, link_id, "MySQL-Link", le_link, le_plink); @@ -1189,7 +1188,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_docref(NULL TSRMLS_CC, E_NOTICE, "%s(): Function called without first fetching all rows from a previous unbuffered query"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "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); @@ -1216,12 +1215,9 @@ mysql_result = mysql_use_result(&mysql->conn); while ((row = mysql_fetch_row(mysql_result))) { if (!strcmp("ALL", row[1])) { - sprintf((char *)&tmp, "Your query requires a full tablescan (table %s, %s rows affected). Use EXPLAIN to optimize your query.", row[0], row[6]); - php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, tmp); - } - else if (!strcmp("INDEX", row[1])) { - sprintf((char *)&tmp, "Your query requires a full indexscan (table %s, %s rows affected). Use EXPLAIN to optimize your query.", row[0], row[6]); - php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, tmp); + php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "Your query requires a full tablescan (table %s, %s rows affected). Use EXPLAIN to optimize your query.", row[0], row[6]); + } else if (!strcmp("INDEX", row[1])) { + php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "Your query requires a full indexscan (table %s, %s rows affected). Use EXPLAIN to optimize your query.", row[0], row[6]); } } mysql_free_result(mysql_result);

« previous php.cvs (#20205) next »