[MDEV-24147] Encoding fails with user created function Created: 2020-11-05 Updated: 2021-01-31 Resolved: 2021-01-31 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Tarquin | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
CentOS |
||
| Description |
|
My hosting service runs MariaDB on a CentOS server. I connect via SSH (utf-8) or via PHP (with encoding everywhere set to utf-8 as well). The same issue happens no matter which of these approaches I use.
Unless I am mistaken, this is a bug. It works correctly in MySQL. MariaDB seems to get confused about which charset it is using with the user function. A simple "SELECT 'ā';" works correctly. SHOW CREATE FUNCTION return_string; This works correctly if you use this instead: |
| Comments |
| Comment by Elena Stepanova [ 2021-01-03 ] |
|
As documented,
As your output shows, you have character_set_database=latin1, so that's what is used. |
| Comment by Tarquin [ 2021-01-31 ] |
|
Thanks @elenst, great catch, that was exactly the difference. (Sorry, missed that message when it came in.) |