Bug #6093 Importation of a mysqldump file with decimal numbers crequires english locales
Submitted: 14 Oct 2004 11:52 Modified: 26 Oct 2004 16:38
Reporter: Net Vicious Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S1 (Critical)
Version: 4.0.21 OS:Linux (Debian GNU/Linux)
Assigned to: CPU Architecture:Any

[14 Oct 2004 11:52] Net Vicious
Description:
Two Linux boxes A and B. A with a testing/unstable Debian and B with a stable/testing Debian.

Both machines have the same mysql, version 4.0.21 Debian testing packages.

Linux Box (A) has the mysql-server configured with language = /usr/share/mysql/spanish and linux locales set to spanish (es_ES@euro)

Linux Box (B) "had" the same configuration but I needed change it due to this bug.

I ran in A a mysqldump --opt database table > file.sql
Later I ran in B an mysql database < file.sql

With the previous configuration the decimals of a Float(12,2) field are discarded during the importation of file.sql

I solved the problem changing the locales of the B box to the default. Before this change B had this variables for the locale setting. I removed they

LANGUAGE=es_ES@euro
LC_ALL=es_ES@euro

LANG=es_ES@euro

Now the configuration it's:
A - spanish mysql - spanish locale
B - spanish mysql - english locale

So it seems mysql haves a little problem with the reading of sql sentences with decimal numbers when the locale defines a different decimal separator than the point. (spanish decimal separator it's the comma).

How to repeat:
Run a mysqldump from a table with a float/double fields with decimals.

Try to import the file created with mysqldump into a mysql-server where the locale it's spanish.

Suggested fix:
mysqldump seems it's now using the locale decimal separator, because it saves the numbers with a decimal dot. The save operation with a comma decimal separator it's wrong because the comma it's used as field separator.

mysql should accept decimals numbers with dot separator always, even though when the locale it's not english.
[26 Oct 2004 16:38] MySQL Verification Team
Hi,

Thank you for the report, but I wasn't able to repeat it neither on my Linux nor on my Windows boxes with spanish locale.