Bug #17270 mysql client tool could not find ../share/charsets folder and fails.

Submitted: 9 Feb 2006 10:03 Modified: 13 Oct 2009 9:55
Reporter: Mr. Sea Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.0.18 OS:Windows (Windows 2000 Pro. SP4)
Assigned to: Iggy Galarza CPU Architecture:Any

[9 Feb 2006 10:03] Mr. Sea
Description:
I setup MySQL 5.0.18 on a Windows 2000 SP4 machine.
I used "mysql-essential-5.0.18-win32.msi" installer package for installation. I configured character set to latin5 (with MySQL Server Instance Config Wizard). Server started without any problem but when I try to use "mysql" command line tool I saw following error message and mysql client could not start;

mysql: Character set 'latin5' is not a compiled character set and is not specified in the 'C:\mysql\\share\charsets\Index.xml' file

After this error I add following line(character-sets-dir) into my.ini file and now it is working.

# CLIENT SECTION
...
[mysql]
default-character-set=latin5
character-sets-dir="C:/Program Files/MySQL/MySQL Server 5.0/share/charsets"

I think this is a bug of "MySQL Server Instance Config Wizard" tool.

How to repeat:
Install mysql server and set character set to latin5 during config wizard. After installation try to use mysql tool with this command;

C:\>mysql -u root -p
mysql: Character set 'latin5' is not a compiled character set and is not specified in the 'C:\mysql\\share\charsets\Index.xml' file

Suggested fix:
After this error I add following line (character-sets-dir) into my.ini file and now it is working.

# CLIENT SECTION
...
[mysql]
default-character-set=latin5
character-sets-dir="C:/Program Files/MySQL/MySQL Server 5.0/share/charsets"
[9 Feb 2006 10:12] Mr. Sea
Sorry. Submit clicked twice. This bug report is duplicate of 17271.
[9 Feb 2006 12:56] MySQL Verification Team
I was unable to repeat the behavior reported. Are you verified if
exists another my.ini file on your machine?

C:\Arquivos de programas\MySQL\MySQL Server 5.0\bin>mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.18-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show variables like "%charac%";
+--------------------------+-----------------------------------------------------------------+
| Variable_name            | Value                                                           |
+--------------------------+-----------------------------------------------------------------+
| character_set_client     | latin5                                                          |
| character_set_connection | latin5                                                          |
| character_set_database   | latin5                                                          |
| character_set_results    | latin5                                                          |
| character_set_server     | latin5                                                          |
| character_set_system     | utf8                                                            |
| character_sets_dir       | C:\Arquivos de programas\MySQL\MySQL Server 5.0\share\charsets\ |
+--------------------------+-----------------------------------------------------------------+
7 rows in set (0.27 sec)

mysql> exit
Bye

C:\Arquivos de programas\MySQL\MySQL Server 5.0\bin>cd ..

C:\Arquivos de programas\MySQL\MySQL Server 5.0>type my.ini
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
<cut>
#
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]

port=3306

[mysql]

default-character-set=latin5
[9 Feb 2006 15:23] MySQL Verification Team
Thank you for the feedback.
Well I just tried to follow your instructions, however if you can
provide instructions step by step I will try again following them.

Thanks in advance.
[13 Feb 2006 12:44] MySQL Verification Team
Thank you for the feedback, still I am unable to repeat. I
will ask to my co-worker for to try on his side.
[14 Feb 2006 15:09] Valeriy Kravchuk
Verified just as described on XP. I had unistalled previous version and remove the c:\Program Files\MySQL direcotry completlely. Then:

"After this uninstall. I started "mysql-essential-5.0.18-win32.msi" installer and followed the wizard with "Developer Machine", "20 concurrent connections", "latin5" character set selections. No errors or warnings shown during or after installation.

I installed MySQL windows service and started it. After successful start I tried
to use mysql client tool to connect server and received this error;

mysql: Character set 'latin5' is not a compiled character set and is
not specified in the 'C:\mysql\\share\charsets\Index.xml' file"

Exactly the same results.
[19 Jul 2007 6:53] Erek Gokturk
This bug (if it is a bug) still exists as of version 5.0.45. Tested on WinXP Pro.

Furthermore, I've also noticed this: while my MySQL installation is in drive J: and all the directories in the my.ini file point to directories in drive J:, the error still says it cannot find index.xml in some directory in drive C:! Is there a default somewhere in the code?

It is marked as S3, but this bug is quite discouraging for users in Turkey who try MySQL for the first time.

--eg
[4 Sep 2007 9:40] Sveta Smirnova
There is similar ODBC bug #30778
[11 May 2009 22:43] Iggy Galarza
Suggest fix.  Add character-sets-dir to default templates.

Attachment: bug17270.patch (application/octet-stream, text), 1.47 KiB.

[25 Jun 2009 20:00] lexa bekoev
"Severity: S3 (Non-critical)" 

Funny, he-h. A couple of days debugging myodbc5.dll.
[25 Jun 2009 20:27] lexa bekoev
mysql-connector-odbc-5.1.5-win32.msi
1) myodbc5.dll seems to ignore character-sets-dir param from my.ini
2) driver\utility.c, copy_wchar_result(), 
...
// There is no charset for field->charsetnr (due to pt. 1),
// therefore after this code
  CHARSET_INFO *from_cs= get_charset(field->charsetnr ? field->charsetnr :
                                     UTF8_CHARSET_NUMBER,
                                     MYF(0));
// from_cs becomes NULL.
...
// And several lines below 
    int (*mb_wc)(struct charset_info_st *, my_wc_t *, const uchar *,
                 const uchar *) = from_cs->cset->mb_wc;
// an exception (access violation) is thrown.
[2 Jul 2009 19:14] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/77823

2789 Ignacio Galarza	2009-07-02
      Bug#17270 - mysql client tool could not find ../share/charsets folder and fails.
      - Define and pass compile time path variables as pre-processor definitions to mimic the makefile build.
      - Set new CMake version and policy requirements explicitly.
      - Changed DATADIR to MYSQL_DATADIR to avoid conflicting definition in Platform SDK header ObjIdl.h which also defines DATADIR.
[31 Jul 2009 19:22] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/79795

2794 Ignacio Galarza	2009-07-31
      Bug#17270 - mysql client tool could not find ../share/charsets folder and fails.
      - Define and pass compile time path variables as pre-processor definitions to 
        mimic the makefile build.
      - Set new CMake version and policy requirements explicitly.
      - Changed DATADIR to MYSQL_DATADIR to avoid conflicting definition in 
        Platform SDK header ObjIdl.h which also defines DATADIR.
[4 Aug 2009 13:56] Bugs System
Pushed into 5.0.85 (revid:davi.arnaut@sun.com-20090804135315-6lfdnk4zjwk7kn7r) (version source revid:davi.arnaut@sun.com-20090804135315-6lfdnk4zjwk7kn7r) (merge vers: 5.0.85) (pib:11)
[4 Aug 2009 19:50] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090804194615-h40sa098mx4z49qg) (version source revid:iggy@mysql.com-20090731202125-mjqx1oozlaz378j2) (merge vers: 5.4.4-alpha) (pib:11)
[4 Aug 2009 20:45] Bugs System
Pushed into 5.1.38 (revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (version source revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (merge vers: 5.1.38) (pib:11)
[1 Oct 2009 5:58] Bugs System
Pushed into 5.1.39-ndb-6.3.28 (revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (version source revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (merge vers: 5.1.39-ndb-6.3.28) (pib:11)
[1 Oct 2009 7:25] Bugs System
Pushed into 5.1.39-ndb-7.0.9 (revid:jonas@mysql.com-20091001072547-kv17uu06hfjhgjay) (version source revid:jonas@mysql.com-20091001071652-irejtnumzbpsbgk2) (merge vers: 5.1.39-ndb-7.0.9) (pib:11)
[1 Oct 2009 13:25] Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (version source revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (merge vers: 5.1.39-ndb-7.1.0) (pib:11)
[5 Oct 2009 10:50] Bugs System
Pushed into 5.1.39-ndb-6.2.19 (revid:jonas@mysql.com-20091005103850-dwij2dojwpvf5hi6) (version source revid:jonas@mysql.com-20090930185117-bhud4ek1y0hsj1nv) (merge vers: 5.1.39-ndb-6.2.19) (pib:11)
[13 Oct 2009 9:55] MC Brown
A note has been added to the 5.0.85, 5.1.37, 5.4.4, and 5.1.39-ndb-6.3.28, 5.1.39-ndb-7.0.9, 5.1.39-ndb-7.1.0 and 5.1.39-ndb-6.2.19 changelogs: 

 Installation of MySQL on Windows would fail to set the correct location for the character set files, which could lead to <command>mysqld</command> and <command>mysql</command> failing to initialize properly.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.056 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.