1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Bug#21557 entries in the general query log truncated at 1000 characters.

The general log write function (general_log_print) uses printf style
arguments which need to be pre-processed, meaning that the all arguments
are copied to a single buffer and the problem is that the buffer size is
constant (1022 characters) but queries can be much larger then this.

The solution is to introduce a new log write function that accepts a
buffer and it's length as arguments. The function is to be used when
a formatted output is not required, which is the case for almost all
query write-to-log calls.

This is a incompatible change with respect to the log format of prepared
statements.
This commit is contained in:
davi@moksha.com.br
2007-10-18 15:45:07 -03:00
parent 5cda50307f
commit dd135211d8
9 changed files with 438 additions and 77 deletions

View File

@ -740,6 +740,9 @@ bool slow_log_print(THD *thd, const char *query, uint query_length,
bool general_log_print(THD *thd, enum enum_server_command command,
const char *format,...);
bool general_log_write(THD *thd, enum enum_server_command command,
const char *query, uint query_length);
#include "sql_class.h"
#include "sql_acl.h"
#include "tztime.h"