[Libreoffice-bugs] [Bug 134982] Base - cannot connect via native mysql connector to XAMMP mysql/mariadb instance installed on Ubuntu 18.04

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 1 08:52:06 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=134982

Alex Thurgood <iplaw67 at tuta.io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iplaw67 at tuta.io,
                   |                            |lionel at mamane.lu

--- Comment #14 from Alex Thurgood <iplaw67 at tuta.io> ---
Also note however, that the code in lines 124-174 of mysql_connection.cxx seems
to imply that a Unix sokcet, or even a named pipe, can be used as a connection
paramater:

 // get user and password for mysql connection
  125     const PropertyValue* pIter = info.getConstArray();
  126     const PropertyValue* pEnd = pIter + info.getLength();
  127     OUString aUser, aPass, sUnixSocket, sNamedPipe;
  128     bool unixSocketPassed = false;
  129     bool namedPipePassed = false;
  130 
  131     m_settings.connectionURL = url;
  132     for (; pIter != pEnd; ++pIter)
  133     {
  134         if (pIter->Name == "user")
  135         {
  136             OSL_VERIFY(pIter->Value >>= aUser);
  137         }
  138         else if (pIter->Name == "password")
  139         {
  140             OSL_VERIFY(pIter->Value >>= aPass);
  141         }
  142         else if (pIter->Name == "LocalSocket")
  143         {
  144             OSL_VERIFY(pIter->Value >>= sUnixSocket);
  145             unixSocketPassed = !sUnixSocket.isEmpty();
  146         }
  147         else if (pIter->Name == "NamedPipe")
  148         {
  149             OSL_VERIFY(pIter->Value >>= sNamedPipe);
  150             namedPipePassed = !sNamedPipe.isEmpty();
  151         }
  152         else if (pIter->Name == "PublicConnectionURL")
  153         {
  154             OSL_VERIFY(pIter->Value >>= m_settings.connectionURL);
  155         }
  156         else if (pIter->Name == "NewURL")
  157         { // legacy name for "PublicConnectionURL"
  158             OSL_VERIFY(pIter->Value >>= m_settings.connectionURL);
  159         }
  160     }
  161 
  162     OString host_str = OUStringToOString(aHostName, m_settings.encoding);
  163     OString user_str = OUStringToOString(aUser, m_settings.encoding);
  164     OString pass_str = OUStringToOString(aPass, m_settings.encoding);
  165     OString schema_str = OUStringToOString(aDbName, m_settings.encoding);
  166     OString socket_str;
  167     if (unixSocketPassed)
  168     {
  169         socket_str = OUStringToOString(sUnixSocket, m_settings.encoding);
  170     }
  171     else if (namedPipePassed)
  172     {
  173         socket_str = OUStringToOString(sNamedPipe, m_settings.encoding);
  174     }


As I'm not familiar with which part takes priority or why, I can't help out
here, this would require someone more knowledgeable about the code in the
connector.

@Lionel : any insights you might be able to offer ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200901/86dbda8d/attachment.htm>


More information about the Libreoffice-bugs mailing list