MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / pack_length_to_packflag

Function pack_length_to_packflag

sql/sql_table.cc:804–814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

802#define f_is_hex_escape(x) ((x) & FIELDFLAG_HEX_ESCAPE)
803
804uint pack_length_to_packflag(uint type)
805{
806 switch (type) {
807 case 1: return f_settype((uint) MYSQL_TYPE_TINY);
808 case 2: return f_settype((uint) MYSQL_TYPE_SHORT);
809 case 3: return f_settype((uint) MYSQL_TYPE_INT24);
810 case 4: return f_settype((uint) MYSQL_TYPE_LONG);
811 case 8: return f_settype((uint) MYSQL_TYPE_LONGLONG);
812 }
813 return 0; // This shouldn't happen
814}
815
816
817bool Create_field::init(THD *thd, const char *fld_name,

Callers 1

prepare_create_fieldFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected