[MXS-4489] PHP program reports different collation_connection when connecting via Maxscale Created: 2023-01-25 Updated: 2023-06-20 Resolved: 2023-02-20 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core |
| Affects Version/s: | 2.5.24, 6.4.5, 22.08.4 |
| Fix Version/s: | 2.5.25, 6.4.6, 22.08.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Hartmut Holzgraefe | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Having a server with
the command line client, return "utf8mb3_general_ci" as result of SHOW VARIABLES LIKE 'collation_connection'; both when connecting to the MariaDB server directly, and when connecting via Maxscale. A PHP program on the other hand also returns "utf8mb3_general_ci" when connecting via Maxscale, but "utf8mb3_swedish_ci" when connecting to MariaDB server directly. This breaks PHP applications that do not explicitly set client character set / collation. PHP test code I used:
Note that PHP does not use a bundled version of libmysqlclient anymore by default, but its own "mysqlnd" implementation of the client protocol. |
| Comments |
| Comment by markus makela [ 2023-02-20 ] |
|
I managed to reproduce this on 22.08 |
| Comment by markus makela [ 2023-02-20 ] |
|
There's a bug where MaxScale always uses the default collation for the character set instead of the one defined for the server. |