diff options
author | unknown <reggie@linux.site> | 2005-07-12 08:35:30 -0600 |
---|---|---|
committer | unknown <reggie@linux.site> | 2005-07-12 08:35:30 -0600 |
commit | 831e2c7f61f664b606d7702740665402a5a25ac3 (patch) | |
tree | 99f19fef27eb12da0b3709aab09ab4573a0b265a /tests | |
parent | 8e9492f01ab2a00849fea3aa73648215069fb195 (diff) | |
download | mariadb-git-831e2c7f61f664b606d7702740665402a5a25ac3.tar.gz |
Bug #7142 Show Fields from fails using Borland's dbExpress interface
The problem here is that columns that have an especially long type
such as an enum type with many options would be longer than 40 chars
but the type column returned from show columns always was defined
as varchar(40).
This is fixed in 5.0 using info schema.
mysql-test/r/ps_1general.result:
update columns which will now be reported as blobs
mysql-test/r/ps_2myisam.result:
update columns which will now be reported as blobs
mysql-test/r/ps_3innodb.result:
update columns which will now be reported as blobs
mysql-test/r/ps_4heap.result:
update columns which will now be reported as blobs
mysql-test/r/ps_5merge.result:
update columns which will now be reported as blobs
sql/item.cc:
report a column as a particular blob type if it's size warrants
sql/sql_show.cc:
Add function to iterate over all the fields of a table and determine
the longest type name.
We call this function at the top of our show fields code. We pass in
either 40 or max_len whichever is longer to the ctor of
Item_empty_string.
tests/mysql_client_test.c:
update columns which will now be reported as blobs
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index dbee6e77e4f..b7232565e0b 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -7173,7 +7173,7 @@ static void test_explain_bug() verify_prepare_field(result, 3, "type", "", MYSQL_TYPE_VAR_STRING, "", "", "", 10, 0); - verify_prepare_field(result, 4, "possible_keys", "", MYSQL_TYPE_VAR_STRING, + verify_prepare_field(result, 4, "possible_keys", "", MYSQL_TYPE_BLOB, "", "", "", NAME_LEN*64, 0); verify_prepare_field(result, 5, "key", "", MYSQL_TYPE_VAR_STRING, @@ -7186,13 +7186,13 @@ static void test_explain_bug() (mysql_get_server_version(mysql) <= 50000 ? 3 : 4096), 0); - verify_prepare_field(result, 7, "ref", "", MYSQL_TYPE_VAR_STRING, + verify_prepare_field(result, 7, "ref", "", MYSQL_TYPE_BLOB, "", "", "", NAME_LEN*16, 0); verify_prepare_field(result, 8, "rows", "", MYSQL_TYPE_LONGLONG, "", "", "", 10, 0); - verify_prepare_field(result, 9, "Extra", "", MYSQL_TYPE_VAR_STRING, + verify_prepare_field(result, 9, "Extra", "", MYSQL_TYPE_BLOB, "", "", "", 255, 0); mysql_free_result(result); |