Bugzilla – Attachment 170575 Details for
Bug 134982
Base - cannot connect via native mysql connector to XAMMP mysql/mariadb instance installed on Ubuntu 18.04
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix MySQL UNIX socket connector
libreoffice-7.0.4.2-mysql-conn-fix.patch (text/plain), 1.38 KB, created by
Krzysztof Hałasa
on 2021-03-19 19:41:06 UTC
(
hide
)
Description:
Fix MySQL UNIX socket connector
Filename:
MIME Type:
Creator:
Krzysztof Hałasa
Created:
2021-03-19 19:41:06 UTC
Size:
1.38 KB
patch
obsolete
>--- libreoffice-7.0.4.2/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx 2020-12-09 19:56:14.000000000 +0100 >+++ libreoffice-7.0.4.2/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx 2021-03-19 19:45:28.256510687 +0100 >@@ -73,9 +73,6 @@ > mysql_library_init(0, nullptr, nullptr); > mysql_init(&m_mysql); > >- // 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()); > >@@ -164,14 +161,20 @@ > OString pass_str = OUStringToOString(aPass, m_settings.encoding); > OString schema_str = OUStringToOString(aDbName, m_settings.encoding); > OString socket_str; >+ >+ // use TCP as connection by default >+ mysql_protocol_type protocol = MYSQL_PROTOCOL_TCP; > if (unixSocketPassed) > { > socket_str = OUStringToOString(sUnixSocket, m_settings.encoding); >+ protocol = MYSQL_PROTOCOL_SOCKET; > } > else if (namedPipePassed) > { > socket_str = OUStringToOString(sNamedPipe, m_settings.encoding); >+ protocol = MYSQL_PROTOCOL_PIPE; > } >+ mysql_options(&m_mysql, MYSQL_OPT_PROTOCOL, &protocol); > > // flags can also be passed as last parameter > if (!mysql_real_connect(&m_mysql, host_str.getStr(), user_str.getStr(), pass_str.getStr(),
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 134982
: 170575