diff options
author | unknown <georg@lmy002.wdf.sap.corp> | 2005-07-19 17:12:00 +0200 |
---|---|---|
committer | unknown <georg@lmy002.wdf.sap.corp> | 2005-07-19 17:12:00 +0200 |
commit | 1de9a05567eabbcbe37ff5b71533e33e96f24c44 (patch) | |
tree | 27b436da7b50846f63296304c0836e1f47bf211c /libmysql | |
parent | 7adfe96d9ebb3428550aeab79f08f5395d0ac44c (diff) | |
download | mariadb-git-1de9a05567eabbcbe37ff5b71533e33e96f24c44.tar.gz |
minor fix (backport from 5.0) - changed function prototype/definition
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/libmysql.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index d80b2ef0e39..e5681edd3d8 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1510,7 +1510,7 @@ const char * STDCALL mysql_character_set_name(MYSQL *mysql) } -int STDCALL mysql_set_character_set(MYSQL *mysql, char *cs_name) +int STDCALL mysql_set_character_set(MYSQL *mysql, const char *cs_name) { struct charset_info_st *cs; const char *save_csdir= charsets_dir; @@ -1518,7 +1518,8 @@ int STDCALL mysql_set_character_set(MYSQL *mysql, char *cs_name) if (mysql->options.charset_dir) charsets_dir= mysql->options.charset_dir; - if ((cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY, MYF(0)))) + if (strlen(cs_name) < MY_CS_NAME_SIZE && + (cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY, MYF(0)))) { char buff[MY_CS_NAME_SIZE + 10]; charsets_dir= save_csdir; |