Bug #43702 | Calling setlocale() in a UDF or plugin changes the output format of SHOW CREATE | ||
---|---|---|---|
Submitted: | 17 Mar 2009 14:03 | Modified: | 11 May 2009 20:55 |
Reporter: | Hartmut Holzgraefe | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: User-defined functions ( UDF ) | Severity: | S3 (Non-critical) |
Version: | 5.0.72, 5.1.32 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[17 Mar 2009 14:03]
Hartmut Holzgraefe
[17 Mar 2009 14:13]
Susanne Ebrecht
I made some tests with other RDBMS: INSERT INTO t VALUES('3,14') <--- works fine in Oracle. But you need the quotes when you want to use comma instead of dot.
[17 Mar 2009 14:19]
Susanne Ebrecht
Joro, I have a dark remember from a discussion with Bar that we are planning to support country/language based number form in future. I remember that I said it is not so important and not necessary before MySQL 7.0 or so. But better you will ask Bar here again.
[17 Mar 2009 14:58]
Georgi Kodinov
I vote for : " * tell people not to use setlocale() in UDFs and plugins -> may be out of the scope of the UDF/plugin developer as the setlocale() call may be hidden in a 3rd party library used by the UDF/plugin " afair we have a documented usage of the system locale (there's even a special collation name for this). And I don't think re-setting the locale after each call to the plugin is a good solution either. So let's move this to a docs bug.
[19 Mar 2009 9:23]
Sergei Golubchik
Plugins should try to avoid setlocale anyway, as it has - as far as I understand - global effect and affects all threads at once. It's hardly desired in a plugin. Anyway, as for this bug - it should be possible to have it fixed in 6.0, where there's no reason to use %f. Hartmut, do you see this bug in 6.0 ?
[5 May 2009 10:41]
Hartmut Holzgraefe
6.0 is not affected
[11 May 2009 20:55]
Omer Barnir
Problem is addressed in 6.0