diff options
author | unknown <davi@moksha.com.br> | 2007-10-18 15:45:07 -0300 |
---|---|---|
committer | unknown <davi@moksha.com.br> | 2007-10-18 15:45:07 -0300 |
commit | b9b481ec70c2475abb6303ae08c6b73592bf0c03 (patch) | |
tree | 540546209ad541756aaa56853f9a69fbf859a671 /sql/rpl_reporting.cc | |
parent | 73458352133ac1d2660e60e84b96d3659cff399a (diff) | |
download | mariadb-git-b9b481ec70c2475abb6303ae08c6b73592bf0c03.tar.gz |
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.
mysql-test/r/log_tables.result:
Add test case result for Bug#21557
mysql-test/t/log_tables.test:
Add test case for Bug#21557
sql/log.cc:
Introduce the logger function general_log_write which is similar to
general_log_print but accepts a single buffer and the buffer length.
The function doesn't perform any formatting and sends the buffer
directly to the underlying log handlers.
sql/log.h:
Introduce the logger function general_log_write.
sql/log_event.cc:
Pass the query buffer directly to the logger function, formatting
is not required on this case.
sql/mysql_priv.h:
Prototype for the logger function general_log_write.
sql/sp_head.cc:
Pass the query buffer directly to the logger function, formatting
is not required on this case.
sql/sql_parse.cc:
Pass the buffer directly to the logger function when formatting
is not required.
sql/sql_prepare.cc:
Don't log the statement id, it avoids making a extra copy of the query
and the query is not truncated anymore if it exceeds the limit.
Diffstat (limited to 'sql/rpl_reporting.cc')
0 files changed, 0 insertions, 0 deletions