From 8b6c2d312b51f10de453aca1ca2164e7432acf3c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Jun 2006 22:11:01 +0500 Subject: bug #20318 (ctype_ucs2_def test fails with embedded) there was two problems about charsets in embedded server 1. mysys/charset.c - defined there default_charset_info variable is modified by both server and client code (particularly when --default-charset option is handled) In embedded server we get two codelines modifying one variable. I created separate default_client_charset_info for client code 2. mysql->charset and mysql->options.charset initialization isn't properly done for embedded server - necessary calls added include/sql_common.h: client charset info default declared libmysqld/lib_sql.cc: thd_init_client_charset calls added libmysqld/libmysqld.c: check_embedded_connection moved to client.c to avoid code duplication sql-common/client.c: charset initialization moved to mysql_init_character_set to be used in embedded server sql/sql_parse.cc: thread client charset initialization moved to thd_init_client_charset to avoid code duplication --- include/sql_common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/sql_common.h b/include/sql_common.h index c07a4a831bb..9fc8d4f457b 100644 --- a/include/sql_common.h +++ b/include/sql_common.h @@ -22,6 +22,7 @@ extern const char *not_error_sqlstate; extern "C" { #endif +extern CHARSET_INFO *default_client_charset_info; MYSQL_FIELD *unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields, my_bool default_value, uint server_capabilities); void free_rows(MYSQL_DATA *cur); -- cgit v1.2.1