unimportant

This commit is contained in:
Cosmin Apreutesei 2021-07-31 21:53:16 +03:00
parent f68e13c9e6
commit e704307b1c
1 changed files with 5 additions and 5 deletions

View File

@ -459,11 +459,11 @@ local function _parse_field_packet(data)
col.type = strbyte(data, pos)
pos = pos + 1
col.flags, pos = _get_byte2(data, pos)
col.allow_null = band(col.flags, NOT_NULL_FLAG) == 0
col.pri_key = band(col.flags, PRI_KEY_FLAG) ~= 0
col.unique_key = band(col.flags, UNIQUE_KEY_FLAG) ~= 0
col.unsigned = band(col.flags, UNSIGNED_FLAG) ~= 0
col.auto_increment = band(col.flags, AUTO_INCREMENT_FLAG) ~= 0
col.not_null = band(col.flags, NOT_NULL_FLAG) ~= 0 or nil
col.pri_key = band(col.flags, PRI_KEY_FLAG) ~= 0 or nil
col.unique_key = band(col.flags, UNIQUE_KEY_FLAG) ~= 0 or nil
col.unsigned = band(col.flags, UNSIGNED_FLAG) ~= 0 or nil
col.auto_increment = band(col.flags, AUTO_INCREMENT_FLAG) ~= 0 or nil
col.decimals = strbyte(data, pos)
pos = pos + 1
local default = sub(data, pos + 2)