summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2003-12-15 23:18:40 +0100
committerunknown <monty@mysql.com>2003-12-15 23:18:40 +0100
commit52a39105116d42159ac005c6caece6928d6039e7 (patch)
treed2cad6e33e67df6f69b6a44ea41f8014562beb75 /sql
parentc3617bb88ce77bcf614037aa371ec0a432ce4c21 (diff)
parent987d8ff9a38acd773fdb23a45c71a3a8a8197d64 (diff)
downloadmariadb-git-52a39105116d42159ac005c6caece6928d6039e7.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/my/mysql-4.1
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_show.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 2ef7262f45c..855b5d1e97e 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -688,14 +688,14 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
{
byte *pos;
uint flags=field->flags;
- String type(tmp,sizeof(tmp), system_charset_info);
+ String type(tmp,sizeof(tmp), field->charset());
uint col_access;
bool null_default_value=0;
protocol->prepare_for_resend();
protocol->store(field->field_name, system_charset_info);
field->sql_type(type);
- protocol->store(type.ptr(), type.length(), system_charset_info);
+ protocol->store(type.ptr(), type.length(), type.charset());
if (verbose)
protocol->store(field->has_charset() ? field->charset()->name : "NULL",
system_charset_info);
@@ -713,7 +713,7 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
null_default_value=1;
if (!null_default_value && !field->is_null())
{ // Not null by default
- type.set(tmp,sizeof(tmp),system_charset_info);
+ type.set(tmp, sizeof(tmp), field->charset());
field->val_str(&type,&type);
protocol->store(type.ptr(),type.length(),type.charset());
}
@@ -1114,7 +1114,7 @@ store_create_info(THD *thd, TABLE *table, String *packet)
packet->append(" default ", 9);
if (!field->is_null())
{ // Not null by default
- type.set(tmp,sizeof(tmp),&my_charset_bin);
+ type.set(tmp, sizeof(tmp), field->charset());
field->val_str(&type,&type);
if (type.length())
append_unescaped(packet, type.ptr(), type.length());