summaryrefslogtreecommitdiff
path: root/sql/sql_test.cc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-01-31 01:06:50 +0300
committerAlexander Nozdrin <alik@sun.com>2010-01-31 01:06:50 +0300
commit2b0f6b5ace4b455344dc25e400873d3d68c90090 (patch)
tree64c1a58bb6f6f5516fbf930759b54e0081b98b90 /sql/sql_test.cc
parent22e0e72370ddbd95d0438b769ac5dda82b2c9b0a (diff)
parentd9e9a73e8f1355a24b27d64d56d555d045ee0b4c (diff)
downloadmariadb-git-2b0f6b5ace4b455344dc25e400873d3d68c90090.tar.gz
Manual merge from mysql-trunk-merge.
Conflicts: - mysql-test/suite/rpl/r/rpl_binlog_grant.result - mysql-test/suite/rpl/r/rpl_sp.result - mysql-test/suite/rpl/t/rpl_binlog_grant.test - sql/sql_parse.cc - sql/sql_table.cc - sql/sql_test.cc
Diffstat (limited to 'sql/sql_test.cc')
-rw-r--r--sql/sql_test.cc24
1 files changed, 17 insertions, 7 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc
index 8dc4b4ffeb6..fe56d6acf3e 100644
--- a/sql/sql_test.cc
+++ b/sql/sql_test.cc
@@ -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;