Use the backend server charset
The default character set should be copied from the server so that MaxScale appears to be the same. This fixes problems where utf8mb4 couldn't be taken into use because MaxScale would always send latin1 as the server charset.
This commit is contained in:
@ -44,6 +44,9 @@
|
||||
#include <log_manager.h>
|
||||
#include <gw_ssl.h>
|
||||
|
||||
/** The latin1 charset */
|
||||
#define SERVER_DEFAULT_CHARSET 0x08
|
||||
|
||||
static SPINLOCK server_spin = SPINLOCK_INIT;
|
||||
static SERVER *allServers = NULL;
|
||||
|
||||
@ -89,6 +92,7 @@ server_alloc(char *servname, char *protocol, unsigned short port)
|
||||
server->persistmaxtime = 0;
|
||||
server->persistpoolmax = 0;
|
||||
server->slave_configured = false;
|
||||
server->charset = SERVER_DEFAULT_CHARSET;
|
||||
spinlock_init(&server->persistlock);
|
||||
|
||||
spinlock_acquire(&server_spin);
|
||||
|
Reference in New Issue
Block a user