| 132 | |
| 133 | |
| 134 | static 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 | |
| 150 | typedef struct |
| 151 | { |