EXECUTE_LOAD_QUERY_EVENT
This event is written into the binary log file for LOAD DATA INFILE events. The event format is similar to a QUERY_EVENT except that it has extra static fields.
Header
Event Type = 0x12
Fields
Fixed data part:
uint<4> The ID of the thread that issued this statement on the master.
uint<4> The time in seconds that the statement took to execute.
uint<1> The length of the name of the database which was the default database when the statement was executed. This name appears later, in the variable data part. It is necessary for statements such as INSERT INTO t VALUES(1) that don't specify the database and rely on the default database previously selected by USE.
uint<2> The error code resulting from execution of the statement on the master.
uint<2> The length of the status variable block.
uint<4> The ID of the loaded file
uint<4> Offset from the start of the statement to the beginning of the filename
uint<4> Offset from the start of the statement to the end of the filename
uint<1> How LOAD DATA INFILE handles duplicates (0x0: error, 0x1: ignore, 0x2: replace).
Variable data part:
byte Zero or more status variables. Each status variable consists of one byte code identifying the variable stored, followed by the value of the variable. The format of the value is variable-specific. The number of bytes 'n' is the length of the status variable block (read in fixed data part)
string The default database name (null-terminated).
string The SQL statement. By subtraction the size of the statement can be known.
Example
TODO: Add an example
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?