summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-04-27 09:36:31 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-04-27 09:36:31 +0300
commitd28ee189b794d3ceebd4a108da5653a1e38279e4 (patch)
treec2ede345b2d9e30c5e7d766ec37bc0740e8b67d5
parent5d856760fb3941b4a36cc484e28c500236c45ac1 (diff)
downloadmariadb-git-d28ee189b794d3ceebd4a108da5653a1e38279e4.tar.gz
MDEV-22271: Follow-up fix of --embedded
Since commit 7198c6ab2dc8f8286f6732824ab985a76ebaaddc the ./mtr --embedded tests would fail to start innodb_plugin because of an undefined reference to the symbol wsrep_log(). Let us define a stub for that function. The embedded server is never built WITH_WSREP, but there are no separate storage engine builds for the embedded server. Hence, by default, the dynamic InnoDB storage engine plugin would be built WITH_WSREP and it would fail to load into the embedded server library due to a reference to the undefined symbol.
-rw-r--r--sql/mysqld.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 4580da89f16..e2cc7390385 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2008, 2018, MariaDB
+ Copyright (c) 2008, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1814,6 +1814,15 @@ static void close_server_sock()
#endif
}
+#else /* EMBEDDED LIBRARY */
+# ifndef _WIN32
+/* Unfortunately, ha_innodb.so is by default built WITH_WSREP, and it
+will be used for both the normal and the embedded server, while the
+embedded server library is never built WITH_WSREP. We must define this
+symbol in the embedded library, so that loading a dynamic InnoDB storage
+engine plugin will work in the embedded server library. */
+void wsrep_log(void (*)(const char *, ...), const char *, ...) {}
+# endif
#endif /*EMBEDDED_LIBRARY*/