[Commits] Rev 3657: MDEV-4127 : Export additional symbols when building RPM, in file:///H:/bzr/5.5/

Vladislav Vaintroub wlad at montyprogram.com
Sun Feb 3 18:45:35 EET 2013


At file:///H:/bzr/5.5/

------------------------------------------------------------
revno: 3657
revision-id: wlad at montyprogram.com-20130203164516-ex2ftmyca5b507g3
parent: elenst at ubuntu11.home-20130202225357-za9bglcf2ngv36xj
committer: Vladislav Vaintroub <wlad at montyprogram.com>
branch nick: 5.5
timestamp: Sun 2013-02-03 17:45:16 +0100
message:
  MDEV-4127 :  Export additional symbols when building RPM,
  to enable both recompiling mysqli or odbc from sources in addition to drop-in replacement functionality.
  
  The case in question is compiling mysqli from sources, that needs client_errors via ER() macro. 
  
  Previously, we exported it as mysql_client_errors (compatibly to Fedora's style symbol renaming, see MDEV-3842).
  However, if MariaDB header files are used when compiling mysqli, client_errors needs to be exported with its original name.
-------------- next part --------------
=== modified file 'libmysql/CMakeLists.txt'
--- a/libmysql/CMakeLists.txt	2013-01-28 11:49:14 +0000
+++ b/libmysql/CMakeLists.txt	2013-02-03 16:45:16 +0000
@@ -251,7 +251,17 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux") 
       mysql_get_charset_by_csname
       mysql_net_realloc
       mysql_client_errors
-    )
+
+      #  Also export the non-renamed variants
+      # (in case someone wants to rebuild mysqli-php or something similar)
+      # See MDEV-4127
+      default_charset_info
+      get_charset
+      get_charset_by_csname
+      net_realloc
+      client_errors)  
+ENDIF()
+  
     # Add special script to fix symbols renames by Fedora
     SET(CLIENT_SOURCES_EXTRA ${CLIENT_SOURCES} rpm_support.cc)
     SET(VERSION_SCRIPT_TEMPLATE 

=== modified file 'libmysql/libmysql_rpm_version.in'
--- a/libmysql/libmysql_rpm_version.in	2013-01-25 16:26:10 +0000
+++ b/libmysql/libmysql_rpm_version.in	2013-02-03 16:45:16 +0000
@@ -34,15 +34,27 @@ libmysqlclient_18 {
         @CLIENT_API_5_5_LIST@
 #
 # Ideally the following symbols wouldn't be exported, but various applications
-# require them.  We limit the namespace damage by prefixing mysql_
+# require them.  Fedora limits the namespace damage by prefixing mysql_
 # (see mysql-dubious-exports.patch), which means the symbols are not present
 # in libmysqlclient_16.
 #
+# MariaDB does not do the Fedora-style function renaming via #define in headers, 
+# however it exports mysql_ prefixed symbols in addition to the "normal" ones.
+#
+# To ensure successful recompilation of affected projects, as well as drop-in replacement
+# for MySQL libraries, provided by distribution, both original symbols and their mysql_ 
+# prefixed counterparts have to be exported.
+
 # mysql-connector-odbc requires these
         mysql_default_charset_info;
         mysql_get_charset;
         mysql_get_charset_by_csname;
         mysql_net_realloc;
+        default_charset_info;
+        get_charset;
+        get_charset_by_csname;
+        net_realloc;
 # PHP's mysqli.so requires this (via the ER() macro)
         mysql_client_errors;
+        client_errors;
 };



More information about the commits mailing list