diff options
author | Igor Babaev <igor@askmonty.org> | 2010-03-29 14:16:12 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2010-03-29 14:16:12 -0700 |
commit | 1a507f4ffdc3091a77409c4baed34cedab97d882 (patch) | |
tree | 18c2f6fa8728ae98b17a4a8dc03784f15a3891af /sql/sql_test.cc | |
parent | 7e4d89c97379249ace6633bc406ff2ec2418252a (diff) | |
parent | 2c77c9ea25d8d01d8e7d6d35f1fdd2e4809be865 (diff) | |
download | mariadb-git-1a507f4ffdc3091a77409c4baed34cedab97d882.tar.gz |
Merge with the latest changes in the 5.2 tree.
Diffstat (limited to 'sql/sql_test.cc')
-rw-r--r-- | sql/sql_test.cc | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc index fc96818bece..5c9077f86ea 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; |