diff options
author | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2005-09-09 13:22:16 +0500 |
---|---|---|
committer | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2005-09-09 13:22:16 +0500 |
commit | acf8d0f4d0f6e704960f2ffc9b03b61ba6c9c831 (patch) | |
tree | 3f10db4d25bda83f7fb3338239da39c5877990d7 /sql | |
parent | 213fa9cbc234c1a10e50f2bf53b2e1f520284034 (diff) | |
download | mariadb-git-acf8d0f4d0f6e704960f2ffc9b03b61ba6c9c831.tar.gz |
Bug#12817 SHOW STATUS now blob fields
This fix is cancellation of ChangeSet
1.2329 05/07/12 08:35:30 reggie@linux.site +8 -0
Bug 7142 Show Fields from fails using Borland's dbExpress interface
The reason is we can't fix bug#7142 without
breaking of existing applications/APIs that worked fine with earlier 4.1
bug 7142 is fixed in 5.0
mysql-test/r/ps_1general.result:
Bug #12817 SHOW STATUS now blob fields
mysql-test/r/ps_2myisam.result:
Bug #12817 SHOW STATUS now blob fields
mysql-test/r/ps_3innodb.result:
Bug #12817 SHOW STATUS now blob fields
mysql-test/r/ps_4heap.result:
Bug #12817 SHOW STATUS now blob fields
mysql-test/r/ps_5merge.result:
Bug #12817 SHOW STATUS now blob fields
sql/item.cc:
Bug #12817 SHOW STATUS now blob fields
sql/sql_show.cc:
Bug #12817 SHOW STATUS now blob fields
tests/mysql_client_test.c:
Bug #12817 SHOW STATUS now blob fields
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item.cc | 9 | ||||
-rw-r--r-- | sql/sql_show.cc | 34 |
2 files changed, 2 insertions, 41 deletions
diff --git a/sql/item.cc b/sql/item.cc index 7aaa678ddb0..010189c321c 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1973,14 +1973,7 @@ void Item::make_field(Send_field *tmp_field) void Item_empty_string::make_field(Send_field *tmp_field) { - enum_field_types type = FIELD_TYPE_VAR_STRING; - if (max_length >= 16777216) - type = FIELD_TYPE_LONG_BLOB; - else if (max_length >= 65536) - type = FIELD_TYPE_MEDIUM_BLOB; - else if (max_length >= 256) - type = FIELD_TYPE_BLOB; - init_make_field(tmp_field, type); + init_make_field(tmp_field,FIELD_TYPE_VAR_STRING); } diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 647dfe2ac4d..7cefd89c23c 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -638,33 +638,6 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild) DBUG_RETURN(0); } -/* - returns the length of the longest type on the given table. - - This is used so that show fields will return the data using the proper - lengths instead of forcing columns such as type to always return with a - given length. -*/ - -uint get_longest_type_in_table(TABLE *table, const char *wild) -{ - Field **ptr,*field; - char tmp[MAX_FIELD_WIDTH]; - uint max_len= 0; - - for (ptr=table->field; (field= *ptr); ptr++) - { - if (!wild || !wild[0] || - !wild_case_compare(system_charset_info, field->field_name,wild)) - { - String type(tmp,sizeof(tmp), system_charset_info); - field->sql_type(type); - max_len= max(max_len, type.length()); - } - } - return max_len; -} - /*************************************************************************** ** List all columns in a table_list->real_name @@ -694,14 +667,9 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild, #ifndef NO_EMBEDDED_ACCESS_CHECKS (void) get_table_grant(thd, table_list); #endif - - /* we scan for the longest since long enum types can exceed 40 */ - uint max_len = get_longest_type_in_table(table, wild); - List<Item> field_list; field_list.push_back(new Item_empty_string("Field",NAME_LEN)); - field_list.push_back(new Item_empty_string("Type", - max_len > 40 ? max_len : 40)); + field_list.push_back(new Item_empty_string("Type", 40)); if (verbose) field_list.push_back(new Item_empty_string("Collation",40)); field_list.push_back(new Item_empty_string("Null",1)); |