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.

  • Event Type = 0x12


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<n> 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<NUL> The default database name (null-terminated).
  • string<EOF> The SQL statement. By subtraction the size of the statement can be known.


TODO: Add an example


Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.