summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-07-19 19:59:32 -0700
committerunknown <jimw@mysql.com>2005-07-19 19:59:32 -0700
commit53e598665e97573a076dd3264baddf89061356bb (patch)
treecd1662000464e703ae4cd92d88d45e6d8167da71 /tests
parent038631da3b8cb818f363ae5ee26f9a5822f55949 (diff)
parentccc3052d1789e04e9914b3fad24213d0655eb10f (diff)
downloadmariadb-git-53e598665e97573a076dd3264baddf89061356bb.tar.gz
Merge bk-internal:/home/bk/mysql-5.0
into mysql.com:/home/jimw/my/mysql-5.0-clean sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged tests/mysql_client_test.c: Auto merged sql/item_timefunc.cc: Auto merged
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c30
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 ?