diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index ffd99915168..76d0ab2e4cc 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -690,13 +690,20 @@ static void verify_col_data(const char *table, const char *col, /* Utility function to verify the field members */ -static void verify_prepare_field(MYSQL_RES *result, - unsigned int no, const char *name, - const char *org_name, - enum enum_field_types type, - const char *table, - const char *org_table, const char *db, - unsigned long length, const char *def) +#define verify_prepare_field(result,no,name,org_name,type,table,\ + org_table,db,length,def) \ + do_verify_prepare_field((result),(no),(name),(org_name),(type), \ + (table),(org_table),(db),(length),(def), \ + __FILE__, __LINE__) + +static void do_verify_prepare_field(MYSQL_RES *result, + unsigned int no, const char *name, + const char *org_name, + enum enum_field_types type, + const char *table, + const char *org_table, const char *db, + unsigned long length, const char *def, + const char *file, int line) { MYSQL_FIELD *field; CHARSET_INFO *cs; @@ -743,8 +750,9 @@ static void verify_prepare_field(MYSQL_RES *result, { if (field->type != type) { - fprintf(stderr, "Expected field type: %d, got type: %d\n", - (int) type, (int) field->type); + fprintf(stderr, + "Expected field type: %d, got type: %d in file %s, line %d\n", + (int) type, (int) field->type, file, line); DIE_UNLESS(field->type == type); } } @@ -7426,8 +7434,8 @@ static void test_explain_bug() MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING, 0, 0, "", 64, 0); - verify_prepare_field(result, 1, "Type", "COLUMN_TYPE", - MYSQL_TYPE_BLOB, 0, 0, "", 0, 0); + verify_prepare_field(result, 1, "Type", "COLUMN_TYPE", MYSQL_TYPE_BLOB, + 0, 0, "", 0, 0); verify_prepare_field(result, 2, "Null", "IS_NULLABLE", mysql_get_server_version(mysql) <= 50000 ? |