Further enhancement in prepared statement logging #4861 #4922
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proper use of DATETIME/TIME/DATE/TIMESTAMP
For columns DATETIME/TIME/DATE/TIMESTAMP , in MYSQL_BIND they are set as length = 0 , but their real size is
sizeof(MYSQL_TIME)
(40 bytes) .For reference,
MYSQL_TIME
is defined as:It is also worth to notice that during the execution of
COM_STMT_EXECUTE
the client library may choose a datatype different than the column type. This because the client library specifies the format of the data being sent.This means that client library could use a
STRING
format when sendingDATETIME
/TIME
/DATE
/TIMESTAMP
, or always specifyDATETIME
because the encoding is always the same.Use hex encoding for string
STRING and BLOB are encoded in hex format. This is useful especially for blob, but blob are often sent as string, thus the same encoding is applied for both
Adding new variable
mysql-eventslog_stmt_parameters
#4923Because of the overhead of logging prepared statements parameters , especially in JSON format and in the presence of large blob, new variable
mysql-eventslog_stmt_parameters
controls if parameters need to be logged or not## Adding event_type
PROXYSQL_METADATA
When creating an event log in binary format, a metadata packet is written.
The metadata is in JSON format.
It currently only provide the ProxySQL version.
This allows application reading the binary format file to identify the ProxySQL version thus know what format is used.
For illustration purposes, tool eventlog_reader_to_json.cpp supports it too.