diff options
author | unknown <msvensson@neptunus.(none)> | 2006-10-24 19:16:18 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-10-24 19:16:18 +0200 |
commit | 7941fdd0271e5e772d925105aefe283b03ab1ba0 (patch) | |
tree | 3aadcb6579898833b48b9ac2713c62d889f1753c /tests | |
parent | 01290beefbe05d0a6f9e3b4ff4b12f5bc81a4a27 (diff) | |
download | mariadb-git-7941fdd0271e5e772d925105aefe283b03ab1ba0.tar.gz |
Bug#23037 Bug in field "Default" of query "SHOW COLUMNS FROM table"
- Fix check in mysql_client_test to reflect the change of datatype
for DEFAULT column
tests/mysql_client_test.c:
Update check of datatype for field DEFAULT returned from "explain"
as datatype has changed after patch for bug 23037
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 5a718b7bde9..96fdb9a4696 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -7497,10 +7497,22 @@ static void test_explain_bug() MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING, 0, 0, "", 3, 0); - verify_prepare_field(result, 4, "Default", "COLUMN_DEFAULT", - mysql_get_server_version(mysql) <= 50000 ? - MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING, - 0, 0, "", 64, 0); + if ( mysql_get_server_version(mysql) >= 50027 ) + { + /* The patch for bug#23037 changes column type of DEAULT to blob */ + verify_prepare_field(result, 4, "Default", "COLUMN_DEFAULT", + MYSQL_TYPE_BLOB, 0, 0, "", 0, 0); + } + else + { + verify_prepare_field(result, 4, "Default", "COLUMN_DEFAULT", + mysql_get_server_version(mysql) >= 50027 ? + MYSQL_TYPE_BLOB : + mysql_get_server_version(mysql) <= 50000 ? + MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING, + 0, 0, "", + mysql_get_server_version(mysql) >= 50027 ? 0 :64, 0); + } verify_prepare_field(result, 5, "Extra", "EXTRA", mysql_get_server_version(mysql) <= 50000 ? |