andrey          Sat Jul  9 22:58:51 2005 EDT

  Modified files:              
    /php-src/ext/pdo_mysql      mysql_statement.c 
  Log:
  stmt->column_count is set only if the result has been already bound, don't
  rely on that and use the real count which is kept in st_mysql_stmt
  #of course using internal values is bad idea but the comment already says
  #that this should be fixed
  
  
http://cvs.php.net/diff.php/php-src/ext/pdo_mysql/mysql_statement.c?r1=1.39&r2=1.40&ty=u
Index: php-src/ext/pdo_mysql/mysql_statement.c
diff -u php-src/ext/pdo_mysql/mysql_statement.c:1.39 
php-src/ext/pdo_mysql/mysql_statement.c:1.40
--- php-src/ext/pdo_mysql/mysql_statement.c:1.39        Sat Jul  9 22:49:14 2005
+++ php-src/ext/pdo_mysql/mysql_statement.c     Sat Jul  9 22:58:51 2005
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: mysql_statement.c,v 1.39 2005/07/10 02:49:14 andrey Exp $ */
+/* $Id: mysql_statement.c,v 1.40 2005/07/10 02:58:51 andrey Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -96,11 +96,11 @@
                        my_bool on = 1;
                        /* if we have bound the buffers don't set the attribute 
again */
                        if (!S->result) {
-                               for (i= 0; i < stmt->column_count; i++) {
-                                       /*
-                                               FIXME: using directly internal 
structs - but for now cleaner
-                                               then calling 2 times 
result_metadata.
-                                       */
+                               /*
+                               FIXME: using directly internal structs - but 
for now cleaner
+                               then calling 2 times result_metadata.
+                               */
+                               for (i= 0; i < S->stmt->field_count; i++) {
                                        switch (S->fields[i].type) {
                                                case MYSQL_TYPE_MEDIUM_BLOB:
                                                case MYSQL_TYPE_LONG_BLOB:

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

Reply via email to