summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/auth_gssapi/gssapi_errmsg.cc1
-rw-r--r--plugin/auth_gssapi/gssapi_server.cc11
-rw-r--r--plugin/auth_gssapi/server_plugin.cc13
-rw-r--r--plugin/auth_gssapi/sspi_client.cc2
-rw-r--r--plugin/auth_gssapi/sspi_server.cc8
-rw-r--r--plugin/cracklib_password_check/cracklib_password_check.c10
-rw-r--r--plugin/feedback/feedback.h1
-rw-r--r--plugin/feedback/utils.cc2
-rw-r--r--plugin/file_key_management/parser.cc1
-rw-r--r--plugin/handler_socket/handlersocket/database.cpp7
-rw-r--r--plugin/handler_socket/handlersocket/handlersocket.cpp3
-rw-r--r--plugin/handler_socket/handlersocket/hstcpsvr.cpp6
-rw-r--r--plugin/handler_socket/handlersocket/hstcpsvr_worker.cpp4
-rw-r--r--plugin/handler_socket/handlersocket/mysql_incl.hpp3
-rw-r--r--plugin/handler_socket/libhsclient/auto_addrinfo.hpp3
-rw-r--r--plugin/handler_socket/libhsclient/hstcpcli.cpp3
-rw-r--r--plugin/handler_socket/libhsclient/socket.cpp5
-rw-r--r--plugin/locale_info/locale_info.cc1
-rw-r--r--plugin/metadata_lock_info/metadata_lock_info.cc2
-rw-r--r--plugin/qc_info/qc_info.cc3
-rw-r--r--plugin/query_response_time/plugin.cc1
-rw-r--r--plugin/semisync/semisync.cc1
-rw-r--r--plugin/semisync/semisync_master.cc1
-rw-r--r--plugin/semisync/semisync_master_plugin.cc1
-rw-r--r--plugin/semisync/semisync_slave.cc1
-rw-r--r--plugin/semisync/semisync_slave_plugin.cc1
-rw-r--r--plugin/server_audit/server_audit.c8
-rw-r--r--plugin/server_audit/test_audit_v4.c1
-rw-r--r--plugin/simple_password_check/simple_password_check.c10
-rw-r--r--plugin/user_variables/user_variables.cc1
-rw-r--r--plugin/userstat/userstat.cc2
-rw-r--r--plugin/wsrep_info/plugin.cc2
32 files changed, 57 insertions, 62 deletions
diff --git a/plugin/auth_gssapi/gssapi_errmsg.cc b/plugin/auth_gssapi/gssapi_errmsg.cc
index 8ea4cab5b02..b0eee0e992e 100644
--- a/plugin/auth_gssapi/gssapi_errmsg.cc
+++ b/plugin/auth_gssapi/gssapi_errmsg.cc
@@ -28,6 +28,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <gssapi.h>
#include <string.h>
+
void gssapi_errmsg(OM_uint32 major, OM_uint32 minor, char *buf, size_t size)
{
OM_uint32 message_context;
diff --git a/plugin/auth_gssapi/gssapi_server.cc b/plugin/auth_gssapi/gssapi_server.cc
index 50c34ecc573..49d0262690e 100644
--- a/plugin/auth_gssapi/gssapi_server.cc
+++ b/plugin/auth_gssapi/gssapi_server.cc
@@ -2,9 +2,8 @@
#include <gssapi/gssapi.h>
#include <stdio.h>
#include <mysql/plugin_auth.h>
-#include <my_sys.h>
#include <mysqld_error.h>
-#include <log.h>
+#include <string.h>
#include "server_plugin.h"
#include "gssapi_errmsg.h"
@@ -18,11 +17,11 @@ static void log_error( OM_uint32 major, OM_uint32 minor, const char *msg)
char sysmsg[1024];
gssapi_errmsg(major, minor, sysmsg, sizeof(sysmsg));
my_printf_error(ER_UNKNOWN_ERROR,"Server GSSAPI error (major %u, minor %u) : %s -%s",
- MYF(0), major, minor, msg, sysmsg);
+ 0, major, minor, msg, sysmsg);
}
else
{
- my_printf_error(ER_UNKNOWN_ERROR, "Server GSSAPI error : %s", MYF(0), msg);
+ my_printf_error(ER_UNKNOWN_ERROR, "Server GSSAPI error : %s", 0, msg);
}
}
@@ -197,7 +196,7 @@ int auth_server(MYSQL_PLUGIN_VIO *vio,const char *user, size_t userlen, int use_
/* send token to peer */
if (output.length)
{
- if (vio->write_packet(vio, (const uchar *) output.value, output.length))
+ if (vio->write_packet(vio, (const unsigned char *) output.value, output.length))
{
gss_release_buffer(&minor, &output);
log_error(major, minor, "communication error(write)");
@@ -237,7 +236,7 @@ int auth_server(MYSQL_PLUGIN_VIO *vio,const char *user, size_t userlen, int use_
{
my_printf_error(ER_ACCESS_DENIED_ERROR,
"GSSAPI name mismatch, requested '%s', actual name '%.*s'",
- MYF(0), user, (int)client_name_buf.length, client_name_str);
+ 0, user, (int)client_name_buf.length, client_name_str);
}
gss_release_buffer(&minor, &client_name_buf);
diff --git a/plugin/auth_gssapi/server_plugin.cc b/plugin/auth_gssapi/server_plugin.cc
index 0c0bcbbbb72..6ffcf5c65c1 100644
--- a/plugin/auth_gssapi/server_plugin.cc
+++ b/plugin/auth_gssapi/server_plugin.cc
@@ -31,9 +31,18 @@
GSSAPI authentication plugin, server side
*/
-#include <my_sys.h>
+
+#ifdef _WIN32
+typedef unsigned __int64 my_ulonglong;
+#else
+typedef unsigned long long my_ulonglong;
+#endif
+
+#include <stdlib.h>
#include <mysqld_error.h>
+#include <typelib.h>
#include <mysql/plugin_auth.h>
+#include "string.h"
#include "server_plugin.h"
#include "common.h"
@@ -132,7 +141,7 @@ static const char* mech_names[] = {
NULL
};
static TYPELIB mech_name_typelib = {
- array_elements(mech_names) - 1,
+ 3,
"mech_name_typelib",
mech_names,
NULL
diff --git a/plugin/auth_gssapi/sspi_client.cc b/plugin/auth_gssapi/sspi_client.cc
index 34c1ce2e7ee..61249dd1072 100644
--- a/plugin/auth_gssapi/sspi_client.cc
+++ b/plugin/auth_gssapi/sspi_client.cc
@@ -180,4 +180,4 @@ cleanup:
FreeCredentialsHandle(&cred);
free(out);
return ret;
-} \ No newline at end of file
+}
diff --git a/plugin/auth_gssapi/sspi_server.cc b/plugin/auth_gssapi/sspi_server.cc
index d2c2ae7e4b9..73c74c2e200 100644
--- a/plugin/auth_gssapi/sspi_server.cc
+++ b/plugin/auth_gssapi/sspi_server.cc
@@ -30,9 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "common.h"
#include "server_plugin.h"
#include <mysql/plugin_auth.h>
-#include <my_sys.h>
#include <mysqld_error.h>
-#include <log.h>
/* This sends the error to the client */
@@ -42,11 +40,11 @@ static void log_error(SECURITY_STATUS err, const char *msg)
{
char buf[1024];
sspi_errmsg(err, buf, sizeof(buf));
- my_printf_error(ER_UNKNOWN_ERROR, "SSPI server error 0x%x - %s - %s", MYF(0), msg, buf);
+ my_printf_error(ER_UNKNOWN_ERROR, "SSPI server error 0x%x - %s - %s", 0, msg, buf);
}
else
{
- my_printf_error(ER_UNKNOWN_ERROR, "SSPI server error %s", MYF(0), msg);
+ my_printf_error(ER_UNKNOWN_ERROR, "SSPI server error %s", 0, msg);
}
}
@@ -249,7 +247,7 @@ int auth_server(MYSQL_PLUGIN_VIO *vio, const char *user, size_t user_len, int co
{
my_printf_error(ER_ACCESS_DENIED_ERROR,
"GSSAPI name mismatch, requested '%s', actual name '%s'",
- MYF(0), user, client_name);
+ 0, user, client_name);
}
cleanup:
diff --git a/plugin/cracklib_password_check/cracklib_password_check.c b/plugin/cracklib_password_check/cracklib_password_check.c
index 94587a6d659..22d5eee21f2 100644
--- a/plugin/cracklib_password_check/cracklib_password_check.c
+++ b/plugin/cracklib_password_check/cracklib_password_check.c
@@ -13,17 +13,15 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-#include <my_config.h>
#include <mysql/plugin_password_validation.h>
#include <crack.h>
#include <string.h>
#include <alloca.h>
-#include <my_sys.h>
#include <mysqld_error.h>
static char *dictionary;
-static int crackme(MYSQL_LEX_STRING *username, MYSQL_LEX_STRING *password)
+static int crackme(MYSQL_CONST_LEX_STRING *username, MYSQL_CONST_LEX_STRING *password)
{
char *user= alloca(username->length + 1);
char *host;
@@ -37,11 +35,11 @@ static int crackme(MYSQL_LEX_STRING *username, MYSQL_LEX_STRING *password)
if ((res= FascistCheckUser(password->str, dictionary, user, host)))
{
my_printf_error(ER_NOT_VALID_PASSWORD, "cracklib: %s",
- MYF(ME_JUST_WARNING), res);
- return TRUE;
+ ME_WARNING, res);
+ return 1;
}
- return FALSE;
+ return 0;
}
static MYSQL_SYSVAR_STR(dictionary, dictionary, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
diff --git a/plugin/feedback/feedback.h b/plugin/feedback/feedback.h
index 5e7e7b1516e..43c9f4ee844 100644
--- a/plugin/feedback/feedback.h
+++ b/plugin/feedback/feedback.h
@@ -14,6 +14,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
#define MYSQL_SERVER 1
+#include <my_global.h>
#include <sql_class.h>
namespace feedback {
diff --git a/plugin/feedback/utils.cc b/plugin/feedback/utils.cc
index 0805a6e1d76..a43dad8d630 100644
--- a/plugin/feedback/utils.cc
+++ b/plugin/feedback/utils.cc
@@ -380,9 +380,7 @@ int fill_misc_data(THD *thd, TABLE_LIST *tables)
{
TABLE *table= tables->table;
-#ifdef MY_ATOMIC_OK
INSERT1("Cpu_count", (my_getncpus(), UNSIGNED));
-#endif
INSERT1("Mem_total", (my_getphysmem(), UNSIGNED));
INSERT1("Now", (thd->query_start(), UNSIGNED));
diff --git a/plugin/file_key_management/parser.cc b/plugin/file_key_management/parser.cc
index ac78186a488..03f78422c47 100644
--- a/plugin/file_key_management/parser.cc
+++ b/plugin/file_key_management/parser.cc
@@ -69,6 +69,7 @@ Example:
openssl enc -aes-256-cbc -md sha1 -k "secret" -in keys.txt -out keys.enc
***********************************************************************/
+#include <my_global.h>
#include "parser.h"
#include <m_string.h>
#include <mysys_err.h>
diff --git a/plugin/handler_socket/handlersocket/database.cpp b/plugin/handler_socket/handlersocket/database.cpp
index 2ddff7689ad..b21d58d243b 100644
--- a/plugin/handler_socket/handlersocket/database.cpp
+++ b/plugin/handler_socket/handlersocket/database.cpp
@@ -6,10 +6,7 @@
* See COPYRIGHT.txt for details.
*/
-#include <my_config.h>
-
-#include <stdlib.h>
-#include <stdio.h>
+#include <my_global.h>
#include <string.h>
#include "database.hpp"
@@ -1050,7 +1047,7 @@ dbcontext::cmd_open(dbcallback_i& cb, const cmd_open_args& arg)
TABLE *const table = table_vec[tblnum].table;
for (uint i = 0; i < table->s->keys; ++i) {
KEY& kinfo = table->key_info[i];
- if (strcmp(kinfo.name, idx_name_to_open) == 0) {
+ if (strcmp(kinfo.name.str, idx_name_to_open) == 0) {
idxnum = i;
break;
}
diff --git a/plugin/handler_socket/handlersocket/handlersocket.cpp b/plugin/handler_socket/handlersocket/handlersocket.cpp
index 6e4c03fcc24..8133497044c 100644
--- a/plugin/handler_socket/handlersocket/handlersocket.cpp
+++ b/plugin/handler_socket/handlersocket/handlersocket.cpp
@@ -6,8 +6,7 @@
* See COPYRIGHT.txt for details.
*/
-#include <my_config.h>
-
+#include <my_global.h>
#include <memory>
#include <string>
#include <stdio.h>
diff --git a/plugin/handler_socket/handlersocket/hstcpsvr.cpp b/plugin/handler_socket/handlersocket/hstcpsvr.cpp
index 925020023bc..250ef2c7be5 100644
--- a/plugin/handler_socket/handlersocket/hstcpsvr.cpp
+++ b/plugin/handler_socket/handlersocket/hstcpsvr.cpp
@@ -6,15 +6,11 @@
* See COPYRIGHT.txt for details.
*/
-#include <my_config.h>
-
-#include <stdlib.h>
+#include <my_global.h>
#include <vector>
-#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
-#include <fcntl.h>
#include <sys/resource.h>
#include "hstcpsvr.hpp"
diff --git a/plugin/handler_socket/handlersocket/hstcpsvr_worker.cpp b/plugin/handler_socket/handlersocket/hstcpsvr_worker.cpp
index c254d17dff5..9863602af7a 100644
--- a/plugin/handler_socket/handlersocket/hstcpsvr_worker.cpp
+++ b/plugin/handler_socket/handlersocket/hstcpsvr_worker.cpp
@@ -6,13 +6,11 @@
* See COPYRIGHT.txt for details.
*/
-#include <my_config.h>
-#include <sys/types.h>
+#include <my_global.h>
#include <netinet/in.h>
#include <errno.h>
#include <poll.h>
#include <unistd.h>
-#include <fcntl.h>
#include <stdexcept>
#include <signal.h>
#include <list>
diff --git a/plugin/handler_socket/handlersocket/mysql_incl.hpp b/plugin/handler_socket/handlersocket/mysql_incl.hpp
index 0fb4fceb143..0d056a7ed4a 100644
--- a/plugin/handler_socket/handlersocket/mysql_incl.hpp
+++ b/plugin/handler_socket/handlersocket/mysql_incl.hpp
@@ -19,8 +19,7 @@
#define MYSQL_SERVER 1
-#include <my_config.h>
-
+#include <my_global.h>
#include <mysql_version.h>
#if MYSQL_VERSION_ID >= 50505
diff --git a/plugin/handler_socket/libhsclient/auto_addrinfo.hpp b/plugin/handler_socket/libhsclient/auto_addrinfo.hpp
index aee22a1d0f6..f9db70fe971 100644
--- a/plugin/handler_socket/libhsclient/auto_addrinfo.hpp
+++ b/plugin/handler_socket/libhsclient/auto_addrinfo.hpp
@@ -9,8 +9,7 @@
#ifndef DENA_AUTO_ADDRINFO_HPP
#define DENA_AUTO_ADDRINFO_HPP
-#include <my_config.h>
-#include <sys/types.h>
+#include <my_global.h>
#include <sys/socket.h>
#include <netdb.h>
#include <string.h>
diff --git a/plugin/handler_socket/libhsclient/hstcpcli.cpp b/plugin/handler_socket/libhsclient/hstcpcli.cpp
index 21c964cb046..461bed3f5d0 100644
--- a/plugin/handler_socket/libhsclient/hstcpcli.cpp
+++ b/plugin/handler_socket/libhsclient/hstcpcli.cpp
@@ -6,8 +6,7 @@
* See COPYRIGHT.txt for details.
*/
-#include <my_config.h>
-
+#include <my_global.h>
#include <stdexcept>
#include "hstcpcli.hpp"
diff --git a/plugin/handler_socket/libhsclient/socket.cpp b/plugin/handler_socket/libhsclient/socket.cpp
index 2c93a3b4846..f1cdc9fb20f 100644
--- a/plugin/handler_socket/libhsclient/socket.cpp
+++ b/plugin/handler_socket/libhsclient/socket.cpp
@@ -6,13 +6,10 @@
* See COPYRIGHT.txt for details.
*/
-#include <my_config.h>
+#include <my_global.h>
#include <stdexcept>
#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
#include <signal.h>
#include <sys/un.h>
diff --git a/plugin/locale_info/locale_info.cc b/plugin/locale_info/locale_info.cc
index 3d775c0be7c..e444b4fade0 100644
--- a/plugin/locale_info/locale_info.cc
+++ b/plugin/locale_info/locale_info.cc
@@ -26,6 +26,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <my_global.h>
#include <sql_class.h> // THD
#include <table.h> // ST_SCHEMA_TABLE
#include <mysql/plugin.h>
diff --git a/plugin/metadata_lock_info/metadata_lock_info.cc b/plugin/metadata_lock_info/metadata_lock_info.cc
index a2e3667dbab..ef6fdd5cc5c 100644
--- a/plugin/metadata_lock_info/metadata_lock_info.cc
+++ b/plugin/metadata_lock_info/metadata_lock_info.cc
@@ -14,7 +14,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
#define MYSQL_SERVER 1
-#include "my_config.h"
+#include <my_global.h>
#include "mysql_version.h"
#include "mysql/plugin.h"
#include "sql_class.h"
diff --git a/plugin/qc_info/qc_info.cc b/plugin/qc_info/qc_info.cc
index b7d7e6f1f45..c01207571d2 100644
--- a/plugin/qc_info/qc_info.cc
+++ b/plugin/qc_info/qc_info.cc
@@ -77,6 +77,7 @@ bool schema_table_store_record(THD *thd, TABLE *table);
#define COLUMN_IN_TRANS 20
#define COLUMN_AUTOCOMMIT 21
#define COLUMN_PKT_NR 22
+#define COLUMN_HITS 23
/* ST_FIELD_INFO is defined in table.h */
static ST_FIELD_INFO qc_info_fields[]=
@@ -104,6 +105,7 @@ static ST_FIELD_INFO qc_info_fields[]=
{"IN_TRANS", MY_INT32_NUM_DECIMAL_DIGITS, MYSQL_TYPE_TINY, 0, 0, 0, 0},
{"AUTOCOMMIT", MY_INT32_NUM_DECIMAL_DIGITS, MYSQL_TYPE_TINY, 0, 0, 0, 0},
{"PACKET_NUMBER", MY_INT32_NUM_DECIMAL_DIGITS, MYSQL_TYPE_TINY, 0, 0, 0, 0},
+ {"HITS", MY_INT32_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0, MY_I_S_UNSIGNED, 0, 0},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, 0}
};
@@ -216,6 +218,7 @@ static int qc_info_fill_table(THD *thd, TABLE_LIST *tables,
table->field[COLUMN_IN_TRANS]->store(flags.in_trans, 0);
table->field[COLUMN_AUTOCOMMIT]->store(flags.autocommit, 0);
table->field[COLUMN_PKT_NR]->store(flags.pkt_nr, 0);
+ table->field[COLUMN_HITS]->store(query_cache_query->hits(), 0);
/* The database against which the statement is executed is part of the
query cache query key
diff --git a/plugin/query_response_time/plugin.cc b/plugin/query_response_time/plugin.cc
index 0ed8b88dc60..7c4a7076c59 100644
--- a/plugin/query_response_time/plugin.cc
+++ b/plugin/query_response_time/plugin.cc
@@ -14,6 +14,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
#define MYSQL_SERVER
+#include <my_global.h>
#include <sql_class.h>
#include <table.h>
#include <sql_show.h>
diff --git a/plugin/semisync/semisync.cc b/plugin/semisync/semisync.cc
index 4a80360ba4d..df37f03ec2f 100644
--- a/plugin/semisync/semisync.cc
+++ b/plugin/semisync/semisync.cc
@@ -16,6 +16,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#include <my_global.h>
#include "semisync.h"
const unsigned char ReplSemiSyncBase::kPacketMagicNum = 0xef;
diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc
index ab437bcfa7e..975b2e13253 100644
--- a/plugin/semisync/semisync_master.cc
+++ b/plugin/semisync/semisync_master.cc
@@ -16,6 +16,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#include <my_global.h>
#include "semisync_master.h"
#define TIME_THOUSAND 1000
diff --git a/plugin/semisync/semisync_master_plugin.cc b/plugin/semisync/semisync_master_plugin.cc
index 309910312c4..b46cf5d79cb 100644
--- a/plugin/semisync/semisync_master_plugin.cc
+++ b/plugin/semisync/semisync_master_plugin.cc
@@ -16,6 +16,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#include <my_global.h>
#include "semisync_master.h"
#include "sql_class.h" // THD
diff --git a/plugin/semisync/semisync_slave.cc b/plugin/semisync/semisync_slave.cc
index 5f98472d5d7..ff8a40aafac 100644
--- a/plugin/semisync/semisync_slave.cc
+++ b/plugin/semisync/semisync_slave.cc
@@ -15,6 +15,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#include <my_global.h>
#include "semisync_slave.h"
char rpl_semi_sync_slave_enabled;
diff --git a/plugin/semisync/semisync_slave_plugin.cc b/plugin/semisync/semisync_slave_plugin.cc
index 3a6c7625d93..df9e8e10429 100644
--- a/plugin/semisync/semisync_slave_plugin.cc
+++ b/plugin/semisync/semisync_slave_plugin.cc
@@ -16,6 +16,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#include <my_global.h>
#include "semisync_slave.h"
#include <mysql.h>
diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c
index 65de695ac9e..af6d2d95a42 100644
--- a/plugin/server_audit/server_audit.c
+++ b/plugin/server_audit/server_audit.c
@@ -20,10 +20,6 @@
#define _my_thread_var loc_thread_var
#include <my_config.h>
-#include <stdio.h>
-#include <time.h>
-#include <string.h>
-#include <fcntl.h>
#ifndef _WIN32
#include <syslog.h>
@@ -75,6 +71,7 @@ static void closelog() {}
*/
#if !defined(MYSQL_DYNAMIC_PLUGIN) && !defined(MARIADB_ONLY)
+#include <typelib.h>
#define MARIADB_ONLY
#endif /*MYSQL_PLUGIN_DYNAMIC*/
@@ -82,11 +79,12 @@ static void closelog() {}
#define MYSQL_SERVICE_LOGGER_INCLUDED
#endif /*MARIADB_ONLY*/
+#include <my_global.h>
#include <my_base.h>
-//#include <my_dir.h>
#include <typelib.h>
#include <mysql/plugin.h>
#include <mysql/plugin_audit.h>
+#include <string.h>
#ifndef RTLD_DEFAULT
#define RTLD_DEFAULT NULL
#endif
diff --git a/plugin/server_audit/test_audit_v4.c b/plugin/server_audit/test_audit_v4.c
index ae7527f8449..65571b14c11 100644
--- a/plugin/server_audit/test_audit_v4.c
+++ b/plugin/server_audit/test_audit_v4.c
@@ -1,5 +1,6 @@
#define PLUGIN_CONTEXT
+/* Can't use <my_global.h> as this includes plugin.h */
#include <stdio.h>
typedef void *MYSQL_THD;
diff --git a/plugin/simple_password_check/simple_password_check.c b/plugin/simple_password_check/simple_password_check.c
index f1cd5aaf17f..dd4051e8169 100644
--- a/plugin/simple_password_check/simple_password_check.c
+++ b/plugin/simple_password_check/simple_password_check.c
@@ -14,12 +14,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-#include <my_sys.h>
#include <mysqld_error.h>
#include <mysql/plugin_password_validation.h>
#include <ctype.h>
#include <string.h>
-#include <my_attribute.h>
static unsigned min_length, min_digits, min_letters, min_others;
@@ -52,19 +50,17 @@ static int validate(MYSQL_CONST_LEX_STRING *username,
others < min_others;
}
-static void fix_min_length(MYSQL_THD thd __attribute__((unused)),
- struct st_mysql_sys_var *var __attribute__((unused)),
+static void fix_min_length(MYSQL_THD thd, struct st_mysql_sys_var *var,
void *var_ptr, const void *save)
{
- uint new_min_length;
+ unsigned int new_min_length;
*((unsigned int *)var_ptr)= *((unsigned int *)save);
new_min_length= min_digits + 2 * min_letters + min_others;
if (min_length < new_min_length)
{
my_printf_error(ER_TRUNCATED_WRONG_VALUE,
"Adjusted the value of simple_password_check_minimal_length "
- "from %u to %u", ME_JUST_WARNING,
- min_length, new_min_length);
+ "from %u to %u", ME_WARNING, min_length, new_min_length);
min_length= new_min_length;
}
}
diff --git a/plugin/user_variables/user_variables.cc b/plugin/user_variables/user_variables.cc
index 9190b2effb7..227455e5696 100644
--- a/plugin/user_variables/user_variables.cc
+++ b/plugin/user_variables/user_variables.cc
@@ -14,6 +14,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define MYSQL_SERVER
+#include <my_global.h>
#include <sql_class.h>
#include <table.h>
#include <sql_show.h>
diff --git a/plugin/userstat/userstat.cc b/plugin/userstat/userstat.cc
index 96d926ac908..2084453fbca 100644
--- a/plugin/userstat/userstat.cc
+++ b/plugin/userstat/userstat.cc
@@ -1,4 +1,4 @@
-#include <my_config.h>
+#include <my_global.h>
#include <mysql/plugin.h>
#include <mysql_version.h>
#include "table.h"
diff --git a/plugin/wsrep_info/plugin.cc b/plugin/wsrep_info/plugin.cc
index ed502d30f88..428bcc5dcfc 100644
--- a/plugin/wsrep_info/plugin.cc
+++ b/plugin/wsrep_info/plugin.cc
@@ -17,7 +17,7 @@
#define MYSQL_SERVER
#endif
-#include <my_config.h>
+#include <my_global.h>
#include <mysql/plugin.h>
#include <table.h> /* ST_SCHEMA_TABLE */
#include <sql_show.h>