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
7537
March 02, 2008 09:03PM
3392
March 07, 2008 07:40PM
Re: UTF-8 & MySQL Proxy
6062
March 10, 2008 12:54AM
4922
March 12, 2008 04:05AM
3289
March 13, 2008 12:31PM
3328
March 14, 2008 12:13AM
3255
March 14, 2008 01:03PM
3468
May 08, 2008 01:17PM
6156
May 09, 2008 03:10PM
3043
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.