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.