andrey                                   Fri, 25 Sep 2009 10:52:29 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=288743

Log:
Fix error code checking for mysql_stmt_attr_set. There
is a test that checks this.

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c
    U   php/php-src/trunk/ext/mysqli/mysqli_api.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c        2009-09-25 
10:42:09 UTC (rev 288742)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c        2009-09-25 
10:52:29 UTC (rev 288743)
@@ -2128,7 +2128,11 @@
        }

        mode = mode_in;
-       if ((rc = mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode))) {
+#if !defined(MYSQLI_USE_MYSQLND)
+       if (mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) {
+#else
+       if (FAIL == mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) {
+#endif
                RETURN_FALSE;
        }
        RETURN_TRUE;

Modified: php/php-src/trunk/ext/mysqli/mysqli_api.c
===================================================================
--- php/php-src/trunk/ext/mysqli/mysqli_api.c   2009-09-25 10:42:09 UTC (rev 
288742)
+++ php/php-src/trunk/ext/mysqli/mysqli_api.c   2009-09-25 10:52:29 UTC (rev 
288743)
@@ -2190,7 +2190,11 @@
        }

        mode = mode_in;
-       if ((rc = mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode))) {
+#if !defined(MYSQLI_USE_MYSQLND)
+       if (mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) {
+#else
+       if (FAIL == mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) {
+#endif
                RETURN_FALSE;
        }
        RETURN_TRUE;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to