summaryrefslogtreecommitdiff
path: root/sql/sql_test.cc
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@sun.com>2009-12-11 01:58:13 -0700
committerMarc Alff <marc.alff@sun.com>2009-12-11 01:58:13 -0700
commitedd5ff174c063376fe8771be9d3f51fc343d9613 (patch)
tree5d91d6cc01f82639588f2c17fbb5289637567684 /sql/sql_test.cc
parente33a8b2a1a254271d99b6c5f00097fd0d89adb90 (diff)
parentbd1f8f5bfaf9748ca445401687cca97a89e0dfee (diff)
downloadmariadb-git-edd5ff174c063376fe8771be9d3f51fc343d9613.tar.gz
Merge mysql-next-mr (revno 2936) --> mysql-next-mr-marc
Diffstat (limited to 'sql/sql_test.cc')
-rw-r--r--sql/sql_test.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc
index af05f1199d4..56ca7111e86 100644
--- a/sql/sql_test.cc
+++ b/sql/sql_test.cc
@@ -55,19 +55,18 @@ static const char *lock_descriptions[] =
void
print_where(COND *cond,const char *info, enum_query_type query_type)
{
+ char buff[256];
+ String str(buff,(uint32) sizeof(buff), system_charset_info);
+ str.length(0);
if (cond)
- {
- char buff[256];
- String str(buff,(uint32) sizeof(buff), system_charset_info);
- str.length(0);
cond->print(&str, query_type);
- str.append('\0');
- DBUG_LOCK_FILE;
- (void) fprintf(DBUG_FILE,"\nWHERE:(%s) ",info);
- (void) fputs(str.ptr(),DBUG_FILE);
- (void) fputc('\n',DBUG_FILE);
- DBUG_UNLOCK_FILE;
- }
+ str.append('\0');
+
+ DBUG_LOCK_FILE;
+ (void) fprintf(DBUG_FILE,"\nWHERE:(%s) %p ", info, cond);
+ (void) fputs(str.ptr(),DBUG_FILE);
+ (void) fputc('\n',DBUG_FILE);
+ DBUG_UNLOCK_FILE;
}
/* This is for debugging purposes */