mirror of
https://github.com/MariaDB/server.git
synced 2025-12-10 19:44:09 +03:00
Port r292 from branches/fts:
Move printing of dfield_t values from dtuple_print to a new function, dfield_print_raw.
This commit is contained in:
@@ -431,6 +431,22 @@ dfield_print_also_hex(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************
|
||||||
|
Print a dfield value using ut_print_buf. */
|
||||||
|
|
||||||
|
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);
|
||||||
|
} else {
|
||||||
|
fputs(" SQL NULL", f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**************************************************************
|
/**************************************************************
|
||||||
The following function prints the contents of a tuple. */
|
The following function prints the contents of a tuple. */
|
||||||
|
|
||||||
@@ -440,7 +456,6 @@ dtuple_print(
|
|||||||
FILE* f, /* in: output stream */
|
FILE* f, /* in: output stream */
|
||||||
dtuple_t* tuple) /* in: tuple */
|
dtuple_t* tuple) /* in: tuple */
|
||||||
{
|
{
|
||||||
dfield_t* field;
|
|
||||||
ulint n_fields;
|
ulint n_fields;
|
||||||
ulint i;
|
ulint i;
|
||||||
|
|
||||||
@@ -451,13 +466,7 @@ dtuple_print(
|
|||||||
for (i = 0; i < n_fields; i++) {
|
for (i = 0; i < n_fields; i++) {
|
||||||
fprintf(f, " %lu:", (ulong) i);
|
fprintf(f, " %lu:", (ulong) i);
|
||||||
|
|
||||||
field = dtuple_get_nth_field(tuple, i);
|
dfield_print_raw(f, dtuple_get_nth_field(tuple, i));
|
||||||
|
|
||||||
if (field->len != UNIV_SQL_NULL) {
|
|
||||||
ut_print_buf(f, field->data, field->len);
|
|
||||||
} else {
|
|
||||||
fputs(" SQL NULL", f);
|
|
||||||
}
|
|
||||||
|
|
||||||
putc(';', f);
|
putc(';', f);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -320,6 +320,14 @@ 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. */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user