1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-16 11:21:15 +03:00

New attempt after Bar's review

Added api function mysql_get_character_set_info which provides
information about the current client character set.


include/mysql.h:
  Added api function mysql_get_character_set_info which provides
  information about the current client character set.
libmysql/libmysql.c:
  Added api function mysql_get_character_set_info which provides
  information about the current client character set.
libmysql/libmysql.def:
  Added api function mysql_get_character_set_info which provides
  information about the current client character set.
tests/mysql_client_test.c:
  Added api function mysql_get_character_set_info which provides
  information about the current client character set.
This commit is contained in:
unknown
2005-07-12 10:31:43 +02:00
parent de1254ad79
commit c5e573dabc
4 changed files with 48 additions and 0 deletions

View File

@ -1495,6 +1495,21 @@ const char * STDCALL mysql_character_set_name(MYSQL *mysql)
return mysql->charset->csname;
}
void STDCALL mysql_get_character_set_info(MYSQL *mysql, CHARACTER_SET *csinfo)
{
csinfo->number = mysql->charset->number;
csinfo->state = mysql->charset->state;
csinfo->csname = mysql->charset->csname;
csinfo->name = mysql->charset->name;
csinfo->comment = mysql->charset->comment;
csinfo->mbminlen = mysql->charset->mbminlen;
csinfo->mbmaxlen = mysql->charset->mbmaxlen;
if (mysql->options.charset_dir)
csinfo->dir = mysql->options.charset_dir;
else
csinfo->dir = charsets_dir;
}
int STDCALL mysql_set_character_set(MYSQL *mysql, char *cs_name)
{