I was hit by this too, is something related with the libmysql shipped with php (may be when used with older
versions of mysqld). It disapperead configuring with:
    --with-mysql=__your_sql_home__.

This bug is in every version i tried: 4.0.5, 4.0.6 and latest cvs.

Attached a patch that definitely solves the problem for me (without the need to compile
with --with-mysql).

Ciao, Roberto.
 

--  Roberto Biancardi  --  +39 2 22475231  --  [EMAIL PROTECTED]  --
 
--- orig/php_mysql.c    Sun Dec  9 00:30:05 2001
+++ ./php_mysql.c       Sat Dec  8 23:43:28 2001
@@ -983,7 +983,13 @@
                mysql_result=mysql_store_result(&mysql->conn);
        }
        if (!mysql_result) {
-               if (PHP_MYSQL_VALID_RESULT(&mysql->conn)) { /* query should have 
returned rows */
+               /*
+                * query should have returned rows ?
+                *      to be on the safe side and avoid unwanted WARNINGS on
+                *      UPDATEs i borrowed the logic from the mysql(1) client.
+                */
+               if ( (use_store == MYSQL_STORE_RESULT && mysql_error(&mysql->conn)[0])
+               ||   (use_store == MYSQL_USE_RESULT && 
+PHP_MYSQL_VALID_RESULT(&mysql->conn)) ) {
                        php_error(E_WARNING, "MySQL:  Unable to save result set");
                        RETURN_FALSE;
                } else {

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to