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

Function mgmapi_error_string

extra/perror.c:41–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39static my_bool ndb_code;
40static char ndb_string[1024];
41int mgmapi_error_string(int err_no, char *str, int size)
42{
43 int i;
44 for (i= 0; i < ndb_mgm_noOfErrorMsgs; i++)
45 {
46 if ((int)ndb_mgm_error_msgs[i].code == err_no)
47 {
48 my_snprintf(str, size-1, "%s", ndb_mgm_error_msgs[i].msg);
49 str[size-1]= '\0';
50 return 0;
51 }
52 }
53 return -1;
54}
55#endif
56
57static struct my_option my_long_options[] =

Callers 1

mainFunction · 0.85

Calls 1

my_snprintfFunction · 0.85

Tested by

no test coverage detected