18 #include <my_global.h>
19 #include <mysqld_error.h>
24 const char *odbc_state;
25 const char *jdbc_state;
30 #include <sql_state.h>
33 const char *mysql_errno_to_sqlstate(uint mysql_errno)
35 uint first=0, end= array_elements(sqlstate_map)-1;
41 uint mid= (first+end)/2;
42 map= sqlstate_map+mid;
43 if (map->mysql_errno < mysql_errno)
48 map= sqlstate_map+first;
49 if (map->mysql_errno == mysql_errno)
50 return map->odbc_state;