summaryrefslogtreecommitdiff
path: root/client/mysql.cc
diff options
context:
space:
mode:
authorunknown <iggy@rolltop.ignatz42.dyndns.org>2006-08-24 11:15:08 -0400
committerunknown <iggy@rolltop.ignatz42.dyndns.org>2006-08-24 11:15:08 -0400
commit689fae640659759d9ea8c48793c39214c3751efc (patch)
tree4c36dfd480b2ac7dc0f6d6229f905deb4502117e /client/mysql.cc
parent734a4c55ada2513217aad574039923ff39611c46 (diff)
downloadmariadb-git-689fae640659759d9ea8c48793c39214c3751efc.tar.gz
Bug #11972: client uses wrong character set after reconnect.
The mysql client uses the default character set on reconnect. The default character set is now controled by the client charset command while the client is running. The charset command now also issues a SET NAMES command to the server to make sure that the client's charset settings are in sync with the server's. client/mysql.cc: Client charset command now changes the default character set and issues a SET NAMES command to the server. mysql-test/r/mysql.result: Corrected results for new behaviour. mysql-test/t/mysql.test: Removed redundant commands from test.
Diffstat (limited to 'client/mysql.cc')
-rw-r--r--client/mysql.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 6af9be965bb..b39a05bc61c 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1974,6 +1974,9 @@ com_charset(String *buffer __attribute__((unused)), char *line)
if (new_cs)
{
charset_info= new_cs;
+ mysql_set_character_set(&mysql, charset_info->csname);
+ default_charset= (char *)charset_info->csname;
+ default_charset_used= 1;
put_info("Charset changed", INFO_INFO);
}
else put_info("Charset is not found", INFO_INFO);