Commit d475256c authored by marko's avatar marko

dfield_print_raw(): Make static. Print at most 1000 bytes to avoid

excessive space usage of the error log.
parent abe9dae4
...@@ -433,15 +433,20 @@ dfield_print_also_hex( ...@@ -433,15 +433,20 @@ dfield_print_also_hex(
/***************************************************************** /*****************************************************************
Print a dfield value using ut_print_buf. */ Print a dfield value using ut_print_buf. */
static
void void
dfield_print_raw( dfield_print_raw(
/*=============*/ /*=============*/
FILE* f, /* in: output stream */ FILE* f, /* in: output stream */
dfield_t* dfield) /* in: dfield */ dfield_t* dfield) /* in: dfield */
{ {
if (dfield->len != UNIV_SQL_NULL) { ulint len = dfield->len;
ut_print_buf(f, dfield->data, dfield->len); if (len != UNIV_SQL_NULL) {
ulint print_len = ut_min(len, 1000);
ut_print_buf(f, dfield->data, print_len);
if (len != print_len) {
fprintf(f, "(total %lu bytes)", (ulong) len);
}
} else { } else {
fputs(" SQL NULL", f); fputs(" SQL NULL", f);
} }
......
...@@ -320,14 +320,6 @@ void ...@@ -320,14 +320,6 @@ void
dfield_print_also_hex( dfield_print_also_hex(
/*==================*/ /*==================*/
dfield_t* dfield); /* in: dfield */ dfield_t* dfield); /* in: dfield */
/*****************************************************************
Print a dfield value using ut_print_buf. */
void
dfield_print_raw(
/*=============*/
FILE* f, /* in: output stream */
dfield_t* dfield); /* in: dfield */
/************************************************************** /**************************************************************
The following function prints the contents of a tuple. */ The following function prints the contents of a tuple. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment