Table_map_log_event column types: numerical identifier and metadata

来源:互联网 发布:解手机密码软件 编辑:程序博客网 时间:2024/06/05 18:55

资料搜索很长时间,原来在代码里,这里备份下,以供不时之需偷笑


Table_map_log_event column types: numerical identifier and metadataNameIdentifierSize of metadata in bytesDescription of metadataMYSQL_TYPE_DECIMAL00No column metadata.MYSQL_TYPE_TINY10No column metadata.MYSQL_TYPE_SHORT20No column metadata.MYSQL_TYPE_LONG30No column metadata.MYSQL_TYPE_FLOAT41 byte1 byte unsigned integer, representing the "pack_length", which is equal to sizeof(float) on the server from which the event originates.MYSQL_TYPE_DOUBLE51 byte1 byte unsigned integer, representing the "pack_length", which is equal to sizeof(double) on the server from which the event originates.MYSQL_TYPE_NULL60No column metadata.MYSQL_TYPE_TIMESTAMP70No column metadata.MYSQL_TYPE_LONGLONG80No column metadata.MYSQL_TYPE_INT2490No column metadata.MYSQL_TYPE_DATE100No column metadata.MYSQL_TYPE_TIME110No column metadata.MYSQL_TYPE_DATETIME120No column metadata.MYSQL_TYPE_YEAR130No column metadata.MYSQL_TYPE_NEWDATE14This enumeration value is only used internally and cannot exist in a binlog.MYSQL_TYPE_VARCHAR152 bytes2 byte unsigned integer representing the maximum length of the string.MYSQL_TYPE_BIT162 bytesA 1 byte unsigned int representing the length in bits of the bitfield (0 to 64), followed by a 1 byte unsigned int representing the number of bytes occupied by the bitfield. The number of bytes is either int((length+7)/8) or int(length/8).MYSQL_TYPE_NEWDECIMAL2462 bytesA 1 byte unsigned int representing the precision, followed by a 1 byte unsigned int representing the number of decimals.MYSQL_TYPE_ENUM247This enumeration value is only used internally and cannot exist in a binlog.MYSQL_TYPE_SET248This enumeration value is only used internally and cannot exist in a binlog.MYSQL_TYPE_TINY_BLOB249–This enumeration value is only used internally and cannot exist in a binlog.MYSQL_TYPE_MEDIUM_BLOB250This enumeration value is only used internally and cannot exist in a binlog.MYSQL_TYPE_LONG_BLOB251This enumeration value is only used internally and cannot exist in a binlog.MYSQL_TYPE_BLOB2521 byteThe pack length, i.e., the number of bytes needed to represent the length of the blob: 1, 2, 3, or 4.MYSQL_TYPE_VAR_STRING2532 bytesThis is used to store both strings and enumeration values. The first byte is a enumeration value storing thereal type, which may be either MYSQL_TYPE_VAR_STRING or MYSQL_TYPE_ENUM. The second byte is a 1 byte unsigned integer representing the field size, i.e., the number of bytes needed to store the length of the string.MYSQL_TYPE_STRING2542 bytesThe first byte is always MYSQL_TYPE_VAR_STRING (i.e., 253). The second byte is the field size, i.e., the number of bytes in the representation of size of the string: 3 or 4.MYSQL_TYPE_GEOMETRY2551 byteThe pack length, i.e., the number of bytes needed to represent the length of the geometry: 1, 2, 3, or 4.