connectivity/source/drivers/mysqlc/mysqlc_connection.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit e0932464fd8dc19de4f2c25bf9ef0812d8c02a64 Author: Tamas Bunth <tamas.bu...@collabora.co.uk> AuthorDate: Thu Sep 5 14:31:35 2019 +0200 Commit: Xisco Faulí <xiscofa...@libreoffice.org> CommitDate: Tue Sep 10 00:42:18 2019 +0200 mysqlc: Support connection to utf8mb4 server This charset is backward compatible with 'normal' utf-8. Change-Id: I4407894bf9029b9c56eb0d2530796e85bd226591 Reviewed-on: https://gerrit.libreoffice.org/78650 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btom...@gmail.com> (cherry picked from commit cc876706b1626078ee056c35f7dda1efcc315df9) Reviewed-on: https://gerrit.libreoffice.org/78784 Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org> diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx index 4ad4d2c6f29b..fb64dd0339e1 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx @@ -88,6 +88,8 @@ void OConnection::construct(const OUString& url, const Sequence<PropertyValue>& // use TCP as connection mysql_protocol_type protocol = MYSQL_PROTOCOL_TCP; mysql_options(&m_mysql, MYSQL_OPT_PROTOCOL, &protocol); + OString charset_name{ "utf8mb4" }; + mysql_options(&m_mysql, MYSQL_SET_CHARSET_NAME, charset_name.getStr()); sal_Int32 nIndex; OUString token; @@ -198,7 +200,7 @@ void OConnection::construct(const OUString& url, const Sequence<PropertyValue>& lcl_executeUpdate(&m_mysql, OString{ "SET session sql_mode='ANSI_QUOTES,NO_AUTO_VALUE_ON_ZERO'" }); - lcl_executeUpdate(&m_mysql, OString{ "SET NAMES utf8" }); + lcl_executeUpdate(&m_mysql, OString{ "SET NAMES utf8mb4" }); } OUString OConnection::getImplementationName() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits