summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-05-30 23:09:35 +0500
committerunknown <bar@bar.mysql.r18.ru>2003-05-30 23:09:35 +0500
commit487a64963b2382fdf816770402fb05d0c681aa23 (patch)
treec740544d9252d2f43d5e5b1b8411dad92bceaa88 /sql/sql_parse.cc
parentd1e7a597aece2bb4aa68069dbfdb3ed85f5cfb31 (diff)
downloadmariadb-git-487a64963b2382fdf816770402fb05d0c681aa23.tar.gz
mysqlshow and mysqldump now send their vharacter set to server
character_set_results is now the same with character_set_client by default
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index b1e0b2dc91d..542b2e0d96e 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -669,9 +669,12 @@ check_connections(THD *thd)
global_system_variables.character_set_client;
thd->variables.collation_connection=
global_system_variables.collation_connection;
+ thd->variables.character_set_results=
+ global_system_variables.character_set_results;
}
else
{
+ thd->variables.character_set_results=
thd->variables.collation_connection=
thd->variables.character_set_client;
}
@@ -1319,7 +1322,8 @@ restore_user:
break;
#else
{
- char *fields;
+ char *fields, *pend;
+ String convname;
TABLE_LIST table_list;
statistic_increment(com_stat[SQLCOM_SHOW_FIELDS],&LOCK_status);
bzero((char*) &table_list,sizeof(table_list));
@@ -1329,8 +1333,11 @@ restore_user:
break;
}
thd->free_list=0;
- table_list.alias= table_list.real_name= thd->strdup(packet);
- packet=strend(packet)+1;
+ pend= strend(packet);
+ convname.copy(packet, pend-packet,
+ thd->variables.character_set_client, system_charset_info);
+ table_list.alias= table_list.real_name= convname.c_ptr();
+ packet= pend+1;
// command not cachable => no gap for data base name
if (!(thd->query=fields=thd->memdup(packet,thd->query_length+1)))
break;