summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-05-14 21:25:46 +0200
committerSergei Golubchik <serg@mariadb.org>2021-05-22 21:56:51 +0200
commitd7321893d8c50071632a102e17a7869da9cb03a5 (patch)
tree8cf080687c6bc2f5a02d355e89d812ec319bbb27
parent9d0fde3ba16d7587d13ba35874f357eb67819e4c (diff)
downloadmariadb-git-d7321893d8c50071632a102e17a7869da9cb03a5.tar.gz
CONNECT: move jar files to /usr/share and include them in DEBs
-rw-r--r--debian/mariadb-plugin-connect.install4
-rw-r--r--sql/mysqld.h2
-rw-r--r--storage/connect/CMakeLists.txt4
-rw-r--r--storage/connect/javaconn.cpp14
4 files changed, 14 insertions, 10 deletions
diff --git a/debian/mariadb-plugin-connect.install b/debian/mariadb-plugin-connect.install
index 8a7aee412df..7b5a5f0633e 100644
--- a/debian/mariadb-plugin-connect.install
+++ b/debian/mariadb-plugin-connect.install
@@ -1,2 +1,6 @@
etc/mysql/conf.d/connect.cnf
usr/lib/mysql/plugin/ha_connect.so
+usr/share/mysql/Mongo2.jar
+usr/share/mysql/Mongo3.jar
+usr/share/mysql/JavaWrappers.jar
+usr/share/mysql/JdbcInterface.jar
diff --git a/sql/mysqld.h b/sql/mysqld.h
index 64e5aef5946..44b0491f138 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -536,7 +536,7 @@ extern ulonglong my_pcre_frame_size;
*/
extern my_bool opt_large_pages;
extern uint opt_large_page_size;
-extern char lc_messages_dir[FN_REFLEN];
+extern MYSQL_PLUGIN_IMPORT char lc_messages_dir[FN_REFLEN];
extern char *lc_messages_dir_ptr, *log_error_file_ptr;
extern MYSQL_PLUGIN_IMPORT char reg_ext[FN_EXTLEN];
extern MYSQL_PLUGIN_IMPORT uint reg_ext_length;
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index e06b59804fb..e9533e8f3e5 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -412,11 +412,11 @@ IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND)
INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/connect/std_data/JavaWrappers.jar
${CMAKE_CURRENT_BINARY_DIR}/JdbcInterface.jar
- DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
+ DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT connect-engine)
IF(CONNECT_WITH_MONGO)
INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/connect/std_data/Mongo2.jar
${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/connect/std_data/Mongo3.jar
- DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
+ DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT connect-engine)
ENDIF()
ENDIF()
diff --git a/storage/connect/javaconn.cpp b/storage/connect/javaconn.cpp
index 3737c82a02e..42af80d15c4 100644
--- a/storage/connect/javaconn.cpp
+++ b/storage/connect/javaconn.cpp
@@ -57,8 +57,8 @@ extern "C" HINSTANCE s_hModule; // Saved module handle
extern char *JvmPath; // The connect_jvm_path global variable value
extern char *ClassPath; // The connect_class_path global variable value
-char *GetPluginDir(void);
char *GetJavaWrapper(void); // The connect_java_wrapper variable value
+extern MYSQL_PLUGIN_IMPORT char lc_messages_dir[FN_REFLEN];
/***********************************************************************/
/* Static JAVAConn objects. */
@@ -401,23 +401,23 @@ bool JAVAConn::Open(PGLOBAL g)
} // endif ClassPath
#if 0
- // Java source will be compiled as a jar file installed in the plugin dir
+ // Java source will be compiled as a jar file installed in the mysql share dir
jpop->Append(sep);
- jpop->Append(GetPluginDir());
+ jpop->Append(lc_messages_dir);
jpop->Append("JdbcInterface.jar");
#endif // 0
- // All wrappers are pre-compiled in JavaWrappers.jar in the plugin dir
+ // All wrappers are pre-compiled in JavaWrappers.jar in the mysql share dir
jpop->Append(sep);
- jpop->Append(GetPluginDir());
+ jpop->Append(lc_messages_dir);
jpop->Append("JavaWrappers.jar");
#if defined(MONGO_SUPPORT)
jpop->Append(sep);
- jpop->Append(GetPluginDir());
+ jpop->Append(lc_messages_dir);
jpop->Append("Mongo3.jar");
jpop->Append(sep);
- jpop->Append(GetPluginDir());
+ jpop->Append(lc_messages_dir);
jpop->Append("Mongo2.jar");
#endif // MONGO_SUPPORT