diff options
author | Alexander Barkov <bar@mysql.com> | 2009-10-21 17:59:47 +0500 |
---|---|---|
committer | Alexander Barkov <bar@mysql.com> | 2009-10-21 17:59:47 +0500 |
commit | c15f970dc87b076279c27c7a0c9a592fa4e7b72e (patch) | |
tree | 9daa322eb14aa0cd7af60162e5b2b6c77446def6 /client/mysqlimport.c | |
parent | d850a57c3b8f7759cb39b6daa65aceb28632cf26 (diff) | |
download | mariadb-git-c15f970dc87b076279c27c7a0c9a592fa4e7b72e.tar.gz |
WL#1349 Use operating system localization to send it as a default client character set
Diffstat (limited to 'client/mysqlimport.c')
-rw-r--r-- | client/mysqlimport.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/client/mysqlimport.c b/client/mysqlimport.c index ef38d760e5d..5b8ec95c06d 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -55,11 +55,10 @@ static char *opt_password=0, *current_user=0, *current_host=0, *current_db=0, *fields_terminated=0, *lines_terminated=0, *enclosed=0, *opt_enclosed=0, *escaped=0, *opt_columns=0, - *default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME; + *default_charset= (char*) MYSQL_AUTODETECT_CHARSET_NAME; static uint opt_mysql_port= 0, opt_protocol= 0; static char * opt_mysql_unix_port=0; static longlong opt_ignore_lines= -1; -static CHARSET_INFO *charset_info= &my_charset_latin1; #include <sslopt-vars.h> #ifdef HAVE_SMEM @@ -282,10 +281,6 @@ static int get_options(int *argc, char ***argv) fprintf(stderr, "You can't use --ignore (-i) and --replace (-r) at the same time.\n"); return(1); } - if (strcmp(default_charset, charset_info->csname) && - !(charset_info= get_charset_by_csname(default_charset, - MY_CS_PRIMARY, MYF(MY_WME)))) - exit(1); if (*argc < 2) { usage(); @@ -440,6 +435,7 @@ static MYSQL *db_connect(char *host, char *database, if (shared_memory_base_name) mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); #endif + mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset); if (!(mysql_real_connect(mysql,host,user,passwd, database,opt_mysql_port,opt_mysql_unix_port, 0))) |