[MXS-682] charset utf8 slave Created: 2016-04-21  Updated: 2016-05-31  Resolved: 2016-05-31

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 1.4.1
Fix Version/s: 1.4.3

Type: Bug Priority: Critical
Reporter: snipe Assignee: Timofey Turenko
Resolution: Not a Bug Votes: 0
Labels: connect-engine, galera

Attachments: File maxscale.cnf    

 Description   

bug with charset UTF-8 and cyrillic.
When send `select` query to the slave(default) then cyrillic display ???(wrong charset). if I by hint or by config manually send query to master, then cyrillic display normaly.
I try to swapped servers, master to slave, slave to master, not work. if query to master all is good, but if query to slave, return ???



 Comments   
Comment by markus makela [ 2016-04-21 ]

Can you attach your maxscale.cnf and any error logs?

Comment by snipe [ 2016-04-21 ]

attach conf, error logs empty

Comment by markus makela [ 2016-04-21 ]

Also please let us know which MariaDB server version and OS you are using.

Comment by markus makela [ 2016-04-21 ]

Do direct connection to the nodes give correct results?

Comment by snipe [ 2016-04-22 ]

I use in all pc is CentOs release 6.4 (Final) and 10.1.13-MariaDB MariaDB Server.

Then I direct connect to the nodes result correct.

Then I had Maxscale version 1.3. i do some test:
1. I shutdown master and send query(work only slave) result will be correct
2. I shutdown slave and send query(work only master) result will be correct
3. When work master and slave result was incorrect

When I update to 1.4 and I have new error, when I shutdown master(only slave work), i send query and get error "failed to create new session", in log i see this strings:
2016-04-22 09:36:24 notice : Server changed state: server2[192.168.5.101:3306]: master_down
2016-04-22 09:36:31 error : Couldn't find suitable Master from 2 candidates.
2016-04-22 09:36:31 error : Failed to create new router session for service 'RW Split Router'. See previous errors for more details.
2016-04-22 09:36:39 error : Couldn't find suitable Master from 2 candidates.
2016-04-22 09:36:39 error : Failed to create new router session for service 'RW Split Router'. See previous errors for more details.

And when I shutdown slave(work only master) all is good and result is correct
After that i up slave, and maxscale still send query on master, and all work good

Comment by Stefan Rubner [ 2016-05-02 ]

Chiming in here: I just realized that my problems when migrating a WordPress blog to a MariaDB-Galera cluster behind MaxScale were caused by MaxScale misbehaving with UTF-8 encodings. Downgrading to MaxScale 1.2.1 fixed the problem immediately. So it seems that somewhere between 1.2.1 and 1.3 (I was using 1.3.1 before) UTF support has been broken somehow. Oh, and lest I forget: no cyrillic characters here but German umlauts.

Comment by Stefan Rubner [ 2016-05-03 ]

Addendum: I was able to "fix" it for my setup using the approach outlined here: https://mathiasbynens.be/notes/mysql-utf8mb4

Seems like MaxScale doesn't keep track of charset settings and thus either returns wrong encodings to the clients or signals wrong encodings to the backend servers.

Comment by Timofey Turenko [ 2016-05-30 ]

I tried to reproduce it: Cyrillic works without problem if I send data to Maxscale in UTF (send INSERT query string in UTF then do SELECT - I see the same in UTF),

but 'set names utf8' breaks everything: it does not matter if Maxscale in use or not

Comment by Timofey Turenko [ 2016-05-31 ]

at least it is not a Maxscale problem.

Generated at Thu Feb 08 04:01:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.