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:
@ -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"
|
||||
|
Reference in New Issue
Block a user