diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-04-01 20:29:45 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-04-02 17:04:20 +0400 |
commit | 4d12a6458e96bf5e20c7109969fbd34bfd1cbaf5 (patch) | |
tree | d29922b69ffbe4a4637fb5ab4f5bcc965d7dab2b /tests | |
parent | e10f9e6c810bf0ced6d79f486d6625d2ed04932e (diff) | |
download | mariadb-git-4d12a6458e96bf5e20c7109969fbd34bfd1cbaf5.tar.gz |
MDEV-19125 Change Send_field::type from enum_field_types to Type_handler*
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 518a9bed976..150c25b8455 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -8397,6 +8397,50 @@ static void test_list_fields() } +static void test_list_fields_blob() +{ + MYSQL_RES *result; + int rc; + myheader("test_list_fields_blob"); + + rc= mysql_query(mysql, "drop table if exists t1"); + myquery(rc); + + rc= mysql_query(mysql, "create table t1(c1 tinyblob, c2 blob, c3 mediumblob, c4 longblob)"); + myquery(rc); + + result= mysql_list_fields(mysql, "t1", NULL); + mytest(result); + + rc= my_process_result_set(result); + DIE_UNLESS(rc == 0); + + /* + All BLOB variant Fields are displayed as MYSQL_TYPE_BLOB in + the result set metadata. Note, some Items display the exact + BLOB type. This inconsistency should be fixed eventually. + */ + verify_prepare_field(result, 0, "c1", "c1", MYSQL_TYPE_BLOB, + "t1", "t1", + current_db, 255, NULL); + + verify_prepare_field(result, 1, "c2", "c2", MYSQL_TYPE_BLOB, + "t1", "t1", + current_db, 65535, NULL); + + verify_prepare_field(result, 2, "c3", "c3", MYSQL_TYPE_BLOB, + "t1", "t1", + current_db, 16777215, NULL); + + verify_prepare_field(result, 3, "c4", "c4", MYSQL_TYPE_BLOB, + "t1", "t1", + current_db, 4294967295ULL, NULL); + + mysql_free_result(result); + myquery(mysql_query(mysql, "drop table t1")); +} + + static void test_list_fields_default() { int rc, i; @@ -20843,6 +20887,7 @@ static struct my_tests_st my_tests[]= { { "test_fetch_column", test_fetch_column }, { "test_mem_overun", test_mem_overun }, { "test_list_fields", test_list_fields }, + { "test_list_fields_blob", test_list_fields_blob }, { "test_list_fields_default", test_list_fields_default }, { "test_free_result", test_free_result }, { "test_free_store_result", test_free_store_result }, |