Bug #2445 console problems
Submitted: 19 Jan 2004 8:42 Modified: 27 Aug 2004 6:45
Reporter: ilias iliadis Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:3.23.x & 4.0.17 OS:Microsoft Windows (windows 2000 server)
Assigned to: Alexander Barkov CPU Architecture:Any

[19 Jan 2004 8:42] ilias iliadis
Description:
I wanted to use MySQL in two different computers.
The one is a Compaq Server the other one is home made.
In both I use Windows Server 2000 v. 5.00.2195 with SP3
I started with MySQL v 3.23.55( and 3.23.58)
I have in both computers locale greek 
and
 Input locales language Greek with keyboard greek as default 
   and 
 language English(United States) with keyboard US.
I use greek names for the tables  and english names for databases.
I have both for mysqld and client section the default-character-set as greek.
I started in the home made PC and all was OK. 
When I tried to input the dump file of one database into the MySQL installed on the Compaq, the greek characters where not recognized, so that the tables were not created.
Copying the tables also didn't help because 
I decided to upgrade to MySQL v 4.0.17
Now I have the exact opposite problem!!!!!!!
Greek names are recognized in the Compaq but not in home made!

Now I am working in my home made PC (The Compaq server is in the institution and I cannot make debbuging or any testing there).
In windows 2000 the terminal uses terminal fonts which use OEM charset.
The strange is that ALL error messages are displaying the table names (with greek names) correct(translated into OEM charset)
If I type a query with the table name without ` then the error says I have an error in my statement.
If I type a query with the table name between ` then the error says table does not exist (displaying the correct name which exists).
Lets say I have a table with the name of one character in ASCII position 193 which is the greek capital Alpha.
If i press the greek capital alpha in terminal then the terminal displays the ASCII character 128 which is diplayed correctly.
If I do not enclose it between ` then the error message says that I have a syntax error, diplaying the character 128
If I enclose it between ` then the error message says that table doesn't exists diplaying the character 128
If I request "SHOW TABLES" then the table is displayed as ASCII character 193 (but with terminal font in console this means that is displayed as another character)
(I enclosed a print screen showing the differencies between error messages and showing the tables)

If I have used the --quote-names argument in mysqldump in MySQL v 3.23.55 then in MySQL v 4.0.17 the tables are created correctly.
(all my mysqldump's are with the --opt arg)

If in my VB project I use names of tables and fields quoted then it works.
The solution is to replace all names of tables and fields in my VB project with a "quoted version" (with `) but:
1. This means a lot of work and a a lot of debugging again.
2. It means that in every new project I must have quoted version of names (plus two keyboard typings for every table or field name).
3. I make the queries in MS Access and then I "steal" the query, copying and pasting it in VB project, and that query doesn't contains quotes, so I must "reprocces" it.

There is also another issue. When I ask for a table remained from v 3.23.55 and the name contained character 223 which is greek accented eta and which is 227 in terminal charset,
the error message says that table doesn't exist but it displays in the place of 227, the ASCII 233 which is the greek accented omega.
If the table doesn't exist then the error message displays correctly the name saying that it doesn't exist.

How to repeat:
Do not know.
[19 Jan 2004 8:43] ilias iliadis
bug report plus printscreen

Attachment: mysqlerr.zip (application/x-zip-compressed, text), 33.86 KiB.

[29 Jan 2004 9:33] MySQL Verification Team
Could you please can provide me the scripts for to create the
tables and the queries in the Greek language, otherwise I can't
to test this bug report.
[4 Feb 2004 4:27] ilias iliadis
mysqldump created file

Attachment: genika.zip (application/x-zip-compressed, text), 45.91 KiB.

[11 Feb 2004 1:48] ilias iliadis
I do not know if this is the right place to write but I submitted the requested sql script to create the tables. 
ilias
[27 Aug 2004 6:45] Alexander Barkov
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

This is not a bug. The problem is that you use three programs:
VB, mysql and mysqld. mysqld is running with "greek" character
sets, which is cp1253. VB uses the same character set. So VB
is compatible with mysqld running in greek mode. But mysql is a
DOS alike program which uses OEM character set, it is not
compatible with cp1253. If you created a table in VB, you will
not be able to see Greek letter properly in mysql. And Visa Versa,
if you created a table in mysql, you will see garbage in VB.
Unfortunately, you cannot use mysql. The situation is better in
MySQL-4.1. It support character set conversion. So this "DOS charset
problem" was solved for many languags in 4.1. Although we don't have
support for Greek DOS character set yet, it is trivial to add it into 4.1.