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

Function get_ha_error_msg

extra/perror.c:134–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132
133
134static const char *get_ha_error_msg(int code)
135{
136 /*
137 If you got compilation error here about compile_time_assert array, check
138 that every HA_ERR_xxx constant has a corresponding error message in
139 handler_error_messages[] list (check mysys/my_handler_errors.h and
140 include/my_base.h).
141 */
142 compile_time_assert(HA_ERR_FIRST + array_elements(handler_error_messages) ==
143 HA_ERR_LAST + 1);
144 if (code >= HA_ERR_FIRST && code <= HA_ERR_LAST)
145 return handler_error_messages[code - HA_ERR_FIRST];
146
147 return NullS;
148}
149
150typedef struct
151{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected