← Back to team overview

maria-developers team mailing list archive

Re: [[Bug] skip-character-set-client-handshake]

 

Hi, spumer-tm!

On Dec 02, spumer-tm@xxxxxxxxx wrote:
> >Description:
> <I'm using MariaDB with my gameservers. Server works with db through
> sourcemod.  In my db i'am using utf8 encoding, and all works fine on
> MariaDB 5.3.8 with params: init-connect = "SET NAMES 'utf8' COLLATE
> 'utf8_general_ci'" skip-character-set-client-handshake
>  
> But after upgrade to 5.5.27 i found a 'bug'.
> When i'm send query from my game server, over time
> character_set_connection, character_set_client and
> character_set_results set to latin1.
> After enable log i saw:
>  
>      88 Connect   login@domain as anonymous on sourcebans
>      88 Query     SET NAMES 'utf8' COLLATE 'utf8_general_ci'
>      88 Query     SET NAMES latin1
>      88 Query     SHOW VARIABLES LIKE '%character_set%'
> But my request is only show vars.
> I assumed that sourcemod is guilty. But
> skip-character-set-client-handshake is set! I disable it, and try
> again.
> At this time i send SET collation_connection = utf8_general_ci and SET
> NAMES utf8 after my query. But over time it set to latin1 again.

skip-character-set-client-handshake does not help when a client does SET
NAMES, it only ignores the charset that the client sends in the
connection handshake packet. If the client issues SET NAMES, then it is
executed as any regular sql statement.

I don't know where your SET NAMES come from, but perhaps it's the
sourcemod or the database connector/driver does it automatically when
setting up a new connection.

You said it worked with 5.3.8. What did you upgrade - only the server
binary? Or the client library and tools were upgraded too? Was your
sourcemod using 5.5 client library after the upgrade?

Regards,
Sergei



References