MySQL Forums
Forum List  »  Router & Proxy

Re: UTF-8 & MySQL Proxy
Posted by: Wei Liu
Date: March 10, 2008 12:54AM

I fix it using a not very good way.

Modify rw-splitting.lua

at function read_query
before line number 202
proxy.queries:append(1, packet)
add one line code
proxy.queries:append(2, string.char(proxy.COM_QUERY) .. "SET NAMES 'utf8'" )

restart you mysql-proxy

everything looks fine.

But this way is not very good, because it will call "SET NAMES 'utf8'" before every query, whatever need or not.

I want to just call "SET NAMES 'utf8'" one times while after mysql-proxy make a real MYSQL connection to backend-servers.

Wish anyone can fix this in better way.

Options: ReplyQuote


Subject
Views
Written By
Posted
8311
March 02, 2008 09:03PM
3617
March 07, 2008 07:40PM
Re: UTF-8 & MySQL Proxy
6703
March 10, 2008 12:54AM
5408
March 12, 2008 04:05AM
3591
March 13, 2008 12:31PM
3656
March 14, 2008 12:13AM
3566
March 14, 2008 01:03PM
3714
May 08, 2008 01:17PM
6606
May 09, 2008 03:10PM
3367
May 09, 2008 03:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.