From d28ee189b794d3ceebd4a108da5653a1e38279e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 27 Apr 2020 09:36:31 +0300 Subject: 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. --- sql/mysqld.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sql') 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*/ -- cgit v1.2.1