| 938 | */ |
| 939 | |
| 940 | static struct errors *parse_padd_string(char* str, int er_count) |
| 941 | { |
| 942 | char *er_name; |
| 943 | uint d_code; |
| 944 | char *start; |
| 945 | DBUG_ENTER("parse_error_string"); |
| 946 | DBUG_PRINT("enter", ("str: %s", str)); |
| 947 | |
| 948 | start= str; |
| 949 | str= skip_delimiters(str); |
| 950 | |
| 951 | /* getting the error name */ |
| 952 | |
| 953 | if (!(er_name= get_word(&str))) |
| 954 | DBUG_RETURN(0); /* OOM: Fatal error */ |
| 955 | |
| 956 | str= skip_delimiters(str); |
| 957 | |
| 958 | if (!(d_code= parse_error_offset(start))) |
| 959 | { |
| 960 | fprintf(stderr, "Failed to parse the error pad string '%s' '%s' (d_code doesn't parse)!\n",er_name,str); |
| 961 | DBUG_RETURN(0); |
| 962 | } |
| 963 | if (d_code < (uint)(er_offset + er_count)) |
| 964 | { |
| 965 | fprintf(stderr, "Error to padding less current error number!\n"); |
| 966 | DBUG_RETURN(0); |
| 967 | } |
| 968 | DBUG_RETURN(create_new_error(TRUE,er_name,d_code,empty_string,empty_string)); |
| 969 | } |
| 970 | |
| 971 | /* |
| 972 | Parsing the string with error name and codes; returns the pointer to |
no test coverage detected