1

I have two mysql installations on two different unix VMs. The first mysql is 5.5, the second 5.7.
On each mysql instance I have a database which contains a table X, with fields of type DOUBLE.

The problem: Fields of type double are displayed with different decimal separators on each of the instances.

The query:

select * from X 

on mysql 5.5 will return the numbers formatted with a colon as a decimal separator, e.g.

1,1/1,2/1,3/0,5120912/1,121201

on the other installation a dot will be used instead:

1.1/1.2/1.3/0.5120912/1.121201

Which mysql or os parameter affects the default decimal separator? I am not able and i don't want to use any CAST functions. I just need all fields of type double returned with a comma by default.

I tried changing the LOCALE (LC_NUMERIC) setting on the OS level but it did not help.

Boendal
  • 2,496
  • 1
  • 23
  • 36
macieii
  • 11
  • 1
  • Mysql **server** knows only one decimal separator: point. The various **clients** may override this setting and display the results differently, but this is client specific and not mysql specific. If comma was allowed as a decimal separator, then it would be difficult for mysql to disntinguish between a decimal number and a list consisting of two integers. – Shadow Jan 04 '20 at 00:25

0 Answers0