diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-08-03 13:58:46 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-08-03 13:58:46 +0200 |
commit | b55715572a27dda9c6bb7b70ee60fb4eefc5e5e4 (patch) | |
tree | 2cf1515664c2eca439f01c476d5d6671a529392a /sql | |
parent | 6a46fd5e2df1da6350774eb5711d13b6d7135289 (diff) | |
download | mariadb-git-b55715572a27dda9c6bb7b70ee60fb4eefc5e5e4.tar.gz |
Limit query length in error log to 64K, to avoid output of full blobs
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 1acf45e63e7..1c9b6a19d38 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2754,7 +2754,7 @@ the thread stack. Please read http://dev.mysql.com/doc/mysql/en/linux.html\n\n", fprintf(stderr, "\nTrying to get some variables.\n" "Some pointers may be invalid and cause the dump to abort.\n"); fprintf(stderr, "Query (%p): ", thd->query()); - my_safe_print_str(thd->query(), thd->query_length()); + my_safe_print_str(thd->query(), min(65536,thd->query_length())); fprintf(stderr, "Connection ID (thread ID): %lu\n", (ulong) thd->thread_id); fprintf(stderr, "Status: %s\n", kreason); fprintf(stderr, "Optimizer switch: %s\n", optimizer_switch_str); |