List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:January 12 2010 12:57pm
Subject:bzr commit into mysql-5.5-next-mr-bugfixing branch (tor.didriksen:2964)
Bug#50271
View as plain text  
#At file:///export/home/didrik/mysqldev-next-mr/next-mr-bf-br1/ based on revid:alik@stripped

 2964 Tor Didriksen	2010-01-12
      Bug #50271: Debug output of JOIN structures is garbled
     @ sql/sql_test.cc
        Assemble results of all the calls to full_name() first,
        in order not to garble the tabular.

    modified:
      sql/sql_test.cc
=== modified file 'sql/sql_test.cc'
--- a/sql/sql_test.cc	2009-12-22 09:35:56 +0000
+++ b/sql/sql_test.cc	2010-01-12 12:57:34 +0000
@@ -168,6 +168,21 @@ TEST_join(JOIN *join)
   uint i,ref;
   DBUG_ENTER("TEST_join");
 
+  /*
+    Assemble results of all the calls to full_name() first,
+    in order not to garble the tabular output below.
+  */
+  String ref_key_parts[MAX_TABLES];
+  for (i=0 ; i < join->tables ; i++)
+  {
+    JOIN_TAB *tab= join->join_tab+i;
+    for (ref=0 ; ref < tab->ref.key_parts ; ref++)
+    {
+      ref_key_parts[i].append(tab->ref.items[ref]->full_name());
+      ref_key_parts[i].append("  ");
+    }
+  }
+
   DBUG_LOCK_FILE;
   (void) fputs("\nInfo about JOIN\n",DBUG_FILE);
   for (i=0 ; i < join->tables ; i++)
@@ -199,13 +214,8 @@ TEST_join(JOIN *join)
     }
     if (tab->ref.key_parts)
     {
-      (void) fputs("                  refs: ",DBUG_FILE);
-      for (ref=0 ; ref < tab->ref.key_parts ; ref++)
-      {
-	Item *item=tab->ref.items[ref];
-	fprintf(DBUG_FILE,"%s  ", item->full_name());
-      }
-      (void) fputc('\n',DBUG_FILE);
+      fprintf(DBUG_FILE,
+              "                  refs:  %s\n", ref_key_parts[i].ptr());
     }
   }
   DBUG_UNLOCK_FILE;


Attachment: [text/bzr-bundle] bzr/tor.didriksen@sun.com-20100112125734-w0oedhvebbku36b0.bundle
Thread
bzr commit into mysql-5.5-next-mr-bugfixing branch (tor.didriksen:2964)Bug#50271Tor Didriksen12 Jan