[Libreoffice-commits] core.git: mysqlc/Library_mysqlc.mk mysqlc/source

Fridrich Å trba fridrich.strba at bluewin.ch
Mon Mar 11 02:10:10 PDT 2013


 mysqlc/Library_mysqlc.mk            |    2 +-
 mysqlc/source/mysqlc_connection.cxx |   35 +----------------------------------
 2 files changed, 2 insertions(+), 35 deletions(-)

New commits:
commit 730df392f5c5424a46fcb360c21d34a04622eb9f
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Mon Mar 11 10:09:39 2013 +0100

    Do not try to dlopen a static internal libmariadb
    
    Change-Id: Ib624089418e22c050e951acc4c487572c7e0ea25

diff --git a/mysqlc/Library_mysqlc.mk b/mysqlc/Library_mysqlc.mk
index ad8bc8d..d67d314 100644
--- a/mysqlc/Library_mysqlc.mk
+++ b/mysqlc/Library_mysqlc.mk
@@ -38,7 +38,7 @@ $(eval $(call gb_Library_use_libraries,mysqlc,\
 
 $(eval $(call gb_Library_add_defs,mysqlc,\
 	-DCPPDBC_EXPORTS \
-	-DCPPCON_LIB_BUILD \
+	-DCPPCONN_LIB_BUILD \
 	-DMARIADBC_VERSION_MAJOR=$(MARIADBC_MAJOR) \
 	-DMARIADBC_VERSION_MINOR=$(MARIADBC_MINOR) \
 	-DMARIADBC_VERSION_MICRO=$(MARIADBC_MICRO) \
diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx
index fe93623..b4ebe77 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -99,10 +99,6 @@ void SAL_CALL OConnection::release()
 }
 /* }}} */
 
-#ifndef SYSTEM_MARIADB
-    extern "C" { void SAL_CALL thisModule() {} }
-#endif
-
 /* {{{ OConnection::construct() -I- */
 void OConnection::construct(const OUString& url, const Sequence< PropertyValue >& info)
     throw(SQLException)
@@ -194,35 +190,6 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue >
                 connProps["socket"] = pipe_str;
             }
 
-#ifndef SYSTEM_MARIADB
-            ::rtl::OUString sMySQLClientLib( "libmariadb" SAL_DLLEXTENSION );
-
-            ::rtl::OUString moduleBase;
-            OSL_VERIFY( ::osl::Module::getUrlFromAddress( &thisModule, moduleBase ) );
-            ::rtl::OUString sMySQLClientLibURL;
-            try
-            {
-                sMySQLClientLibURL = ::rtl::Uri::convertRelToAbs( moduleBase, sMySQLClientLib.pData );
-            }
-            catch ( const ::rtl::MalformedUriException& e )
-            {
-                (void)e; // silence compiler
-            #if OSL_DEBUG_LEVEL > 0
-                ::rtl::OString sMessage( "OConnection::construct: malformed URI: " );
-                sMessage += ::rtl::OUStringToOString( e.getMessage(), osl_getThreadTextEncoding() );
-                OSL_FAIL( sMessage.getStr() );
-            #endif
-            }
-
-            ::rtl::OUString sMySQLClientLibPath;
-            osl_getSystemPathFromFileURL( sMySQLClientLibURL.pData, &sMySQLClientLibPath.pData );
-
-            sql::SQLString mysqlLib = ::rtl::OUStringToOString( sMySQLClientLibPath, osl_getThreadTextEncoding() ).getStr();
-            connProps["clientlib"] = mysqlLib;
-
-            OSL_TRACE("clientlib=%s", mysqlLib.c_str());
-#endif
-
             OSL_TRACE("hostName=%s", host_str.c_str());
             OSL_TRACE("port=%i", int(nPort));
             OSL_TRACE("userName=%s", user_str.c_str());
@@ -243,7 +210,7 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue >
     // Check if the server is 4.1 or above
     if (this->getMysqlVersion() < 40100) {
         throw SQLException(
-            ::rtl::OUString( "MySQL Connector/OO.org requires MySQL Server 4.1 or above"  ),
+            ::rtl::OUString( "MariaDB LibreOffice Connector requires MySQL Server 4.1 or above"  ),
             *this,
             ::rtl::OUString(),
             0,


More information about the Libreoffice-commits mailing list