| Bug #7891 | mysql_character_set_name() returns collation | ||
|---|---|---|---|
| Submitted: | 14 Jan 2005 2:04 | Modified: | 17 Jan 2005 5:36 |
| Reporter: | Andy Dustman | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 4.1.8 | OS: | Any (any) |
| Assigned to: | Alexander Barkov | CPU Architecture: | Any |
[14 Jan 2005 2:04]
Andy Dustman
[14 Jan 2005 3:08]
Andy Dustman
C test case:
#include <mysql.h>
#include <stdio.h>
int main(int argc, char **argv) {
MYSQL db;
mysql_init(&db);
mysql_options(&db, MYSQL_READ_DEFAULT_FILE, "~/.my.cnf");
printf("%s\n", argv[1]);
mysql_real_connect(&db, argv[1], NULL, NULL, NULL, 0, NULL, 0);
printf("%s\n", mysql_get_client_info());
printf("%s\n", mysql_get_server_info(&db));
printf("%s\n", mysql_character_set_name(&db));
}
10.0.0.2 has MySQL-4.0.22
10.0.0.4 has MySQL-4.1.8
Results on 10.0.0.4:
$ ./charset 127.0.0.1
127.0.0.1
4.1.8
4.1.8
latin1_swedish_ci
$ ./charset 10.0.0.2
10.0.0.2
4.1.8
4.0.22
latin1_swedish_ci
Results on 10.0.0.2:
$ ./charset 127.0.0.1
127.0.0.1
4.0.22
4.0.22
latin1
$ ./charset 10.0.0.4
10.0.0.4
4.0.22
4.1.8
latin1
From this we can conclude that the 4.0 client library returns the character set name and the 4.1 client library returns the collation name; the behavior is not tied to the server version.
[17 Jan 2005 5:36]
Alexander Barkov
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.
If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information
about accessing the source trees is available at
http://www.mysql.com/doc/en/Installing_source_tree.html
Additional info:
fixed in 4.1.9 and 5.0.3
