summaryrefslogtreecommitdiff
path: root/sql/sql_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_test.cc')
-rw-r--r--sql/sql_test.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc
index 541fcc155af..8e945d0893f 100644
--- a/sql/sql_test.cc
+++ b/sql/sql_test.cc
@@ -57,14 +57,15 @@ print_where(COND *cond,const char *info, enum_query_type query_type)
{
if (cond)
{
- char buff[256];
+ char buff[1024];
String str(buff,(uint32) sizeof(buff), system_charset_info);
str.length(0);
+ str.extra_allocation(1024);
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) fputs(str.c_ptr_safe(),DBUG_FILE);
(void) fputc('\n',DBUG_FILE);
DBUG_UNLOCK_FILE;
}
@@ -156,7 +157,7 @@ void TEST_filesort(SORT_FIELD *sortorder,uint s_length)
out.append('\0'); // Purify doesn't like c_ptr()
DBUG_LOCK_FILE;
VOID(fputs("\nInfo about FILESORT\n",DBUG_FILE));
- fprintf(DBUG_FILE,"Sortorder: %s\n",out.ptr());
+ fprintf(DBUG_FILE,"Sortorder: %s\n",out.c_ptr_safe());
DBUG_UNLOCK_FILE;
DBUG_VOID_RETURN;
}
@@ -191,7 +192,7 @@ TEST_join(JOIN *join)
TABLE *form=tab->table;
char key_map_buff[128];
fprintf(DBUG_FILE,"%-16.16s type: %-7s q_keys: %s refs: %d key: %d len: %d\n",
- form->alias,
+ form->alias.c_ptr(),
join_type_str[tab->type],
tab->keys.print(key_map_buff),
tab->ref.key_parts,
@@ -215,7 +216,7 @@ TEST_join(JOIN *join)
if (tab->ref.key_parts)
{
fprintf(DBUG_FILE,
- " refs: %s\n", ref_key_parts[i].ptr());
+ " refs: %s\n", ref_key_parts[i].c_ptr_safe());
}
}
DBUG_UNLOCK_FILE;