This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-22. For the latest, interactive version please visit https://mariadb.com/kb/.

PACKET_BINDATA

In contrast to the text protocol, the binary protocol transfers the data according to the format of the field types returned in PACKET_METADATA.

Field typeRepresentation
MYSQL_TYPE_BITstr_LEC
MYSQL_TYPE_BLOBstr_LEC
MYSQL_TYPE_DATE
MYSQL_TYPE_DATETIME
MYSQL_TYPE_TIMESTAMP
int_11 (default)
int_7 (no microseconds)
int_4 (no time values)
int_0 (no values)
MYSQL_TYPE_DECIMALstr_LEC
MYSQL_TYPE_DOUBLEint_8
MYSQL_TYPE_ENUMstr_LEC
MYSQL_TYPE_FLOATint_4
MYSQL_TYPE_GEOMETRYstr_LEC
MYSQL_TYPE_INT24int_4
MYSQL_TYPE_JSONstr_LEC
MYSQL_TYPE_LONGLONGint_8
MYSQL_TYPE_LONG_BLOBstr_LEC
MYSQL_TYPE_LONGint_4
MYSQL_TYPE_MEDIUM_BLOBstr_LEC
MYSQL_TYPE_NEWDECIMALstr_LEC
MYSQL_TYPE_NULLstored in bitmap
MYSQL_TYPE_SETstr_LEC
MYSQL_TYPE_STRINGstr_LEC
MYSQL_TYPE_SHORTint_2
MYSQL_TYPE_TINY_BLOBstr_LEC
MYSQL_TYPE_TINYint_1
MYSQL_TYPE_VARCHARstr_LEC
MYSQL_TYPE_VAR_STRINGstr_LEC
MYSQL_TYPE_YEARint_4

Fields

(column_count + 7)/8   null bitmap
while (!eof) {
  for (i=0; i < column_count; i++)
  {
    data (length depends on the data type)
  }
}
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.