summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2009-03-05 17:47:31 +0100
committerGuilhem Bichot <guilhem@mysql.com>2009-03-05 17:47:31 +0100
commita15d25f07e56cbd80aecbeadef635d3b55e00e85 (patch)
tree6b1cea18a0dab8069fa90ac4b692cc6394fa0a83
parent8a715a599077b7546af558aa47e37423dc322f7e (diff)
downloadmariadb-git-a15d25f07e56cbd80aecbeadef635d3b55e00e85.tar.gz
In maria_recovery.trace we can see the Query which generated this record, but this printed too much
(query is not 0-terminated in the log record): limit it to the true query's size.
-rw-r--r--storage/maria/ma_recovery.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/maria/ma_recovery.c b/storage/maria/ma_recovery.c
index 08aba4fdcd6..54639b596d9 100644
--- a/storage/maria/ma_recovery.c
+++ b/storage/maria/ma_recovery.c
@@ -2031,7 +2031,8 @@ prototype_redo_exec_hook(DEBUG_INFO)
data= log_record_buffer.str + 1;
switch (debug_info) {
case LOGREC_DEBUG_INFO_QUERY:
- tprint(tracef, "Query: %s\n", (char*) data);
+ tprint(tracef, "Query: %.*s\n", rec->record_length - 1,
+ (char*) data);
break;
default:
DBUG_ASSERT(0);