From ac53e5ead8c95164e0f66c50b9e8c039efca0b9d Mon Sep 17 00:00:00 2001 From: marko <> Date: Thu, 17 Aug 2006 12:46:19 +0000 Subject: [PATCH] dfield_print_raw(): Make static. Print at most 1000 bytes to avoid excessive space usage of the error log. --- data/data0data.c | 11 ++++++++--- include/data0data.h | 8 -------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/data/data0data.c b/data/data0data.c index b2c8408e901..36127787fee 100644 --- a/data/data0data.c +++ b/data/data0data.c @@ -433,15 +433,20 @@ dfield_print_also_hex( /***************************************************************** Print a dfield value using ut_print_buf. */ - +static void dfield_print_raw( /*=============*/ FILE* f, /* in: output stream */ dfield_t* dfield) /* in: dfield */ { - if (dfield->len != UNIV_SQL_NULL) { - ut_print_buf(f, dfield->data, dfield->len); + ulint len = 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 { fputs(" SQL NULL", f); } diff --git a/include/data0data.h b/include/data0data.h index 8e906fcb2e5..40592c3c0ce 100644 --- a/include/data0data.h +++ b/include/data0data.h @@ -320,14 +320,6 @@ void dfield_print_also_hex( /*==================*/ 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. */