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

Function check_message_format

extra/comp_err.c:790–810  ·  view source on GitHub ↗

Check message format specifiers against error message for previous language SYNOPSIS check_message_format() err Error to check message for mess Message to check RETURN VALUE Returns 0 if no previous error message or message format is ok */

Source from the content-addressed store, hash-verified

788 Returns 0 if no previous error message or message format is ok
789*/
790static int check_message_format(struct errors *err,
791 const char* mess)
792{
793 struct message *first;
794 DBUG_ENTER("check_message_format");
795
796 /* Get first message(if any) */
797 if ((err->msg).elements == 0)
798 DBUG_RETURN(0); /* No previous message to compare against */
799
800 first= dynamic_element(&err->msg, 0, struct message*);
801 DBUG_ASSERT(first != NULL);
802
803 if (checksum_format_specifier(first->text) !=
804 checksum_format_specifier(mess))
805 {
806 /* Check sum of format specifiers failed, they should be equal */
807 DBUG_RETURN(1);
808 }
809 DBUG_RETURN(0);
810}
811
812
813/*

Callers 1

parse_input_fileFunction · 0.85

Calls 1

Tested by

no test coverage detected