summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xCMakeLists.txt1
-rw-r--r--extra/libevent/evbuffer.c3
-rw-r--r--extra/libevent/event.c3
-rw-r--r--extra/libevent/signal.c2
-rw-r--r--include/m_ctype.h6
-rw-r--r--include/my_global.h5
-rw-r--r--server-tools/CMakeLists.txt2
-rwxr-xr-xserver-tools/instance-manager/CMakeLists.txt2
-rw-r--r--sql-common/client.c4
-rw-r--r--sql/client_settings.h1
-rw-r--r--sql/log_event.cc3
-rw-r--r--sql/mysqld.cc2
-rw-r--r--sql/sql_class.cc2
-rw-r--r--sql/sql_show.cc4
-rw-r--r--storage/maria/ma_loghandler.c5
15 files changed, 22 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0124ac0c71b..442e782a720 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,7 @@ ADD_DEFINITIONS(-DMYSQL_DATADIR="c:/Program Files/MySQL/MySQL Server ${MYSQL_BAS
ADD_DEFINITIONS(-DDEFAULT_CHARSET_HOME="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/")
ADD_DEFINITIONS(-DPACKAGE=mysql)
ADD_DEFINITIONS(-DSHAREDIR="share")
+ADD_DEFINITIONS(-DPLUGINDIR="lib/plugin")
# Set debug options
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFORCE_INIT_OF_VARS")
diff --git a/extra/libevent/evbuffer.c b/extra/libevent/evbuffer.c
index 758143c8225..6fe791380ea 100644
--- a/extra/libevent/evbuffer.c
+++ b/extra/libevent/evbuffer.c
@@ -75,8 +75,7 @@ bufferevent_add(struct event *ev, int timeout)
*/
void
-bufferevent_read_pressure_cb(struct evbuffer *buf,
- size_t old __attribute__((unused)), size_t now,
+bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old, size_t now,
void *arg) {
struct bufferevent *bufev = arg;
/*
diff --git a/extra/libevent/event.c b/extra/libevent/event.c
index 2042c2de626..e96c1b6a3ab 100644
--- a/extra/libevent/event.c
+++ b/extra/libevent/event.c
@@ -394,8 +394,7 @@ event_base_get_method(struct event_base *base)
}
static void
-event_loopexit_cb(int fd __attribute__((unused)),
- short what __attribute__((unused)), void *arg)
+event_loopexit_cb(int fd, short what, void *arg)
{
struct event_base *base = arg;
base->event_gotterm = 1;
diff --git a/extra/libevent/signal.c b/extra/libevent/signal.c
index c4a1d0da167..964ae37fed2 100644
--- a/extra/libevent/signal.c
+++ b/extra/libevent/signal.c
@@ -69,7 +69,7 @@ static void evsignal_handler(int sig);
/* Callback for when the signal handler write a byte to our signaling socket */
static void
-evsignal_cb(int fd, short what __attribute((unused)), void *arg __attribute((unused)))
+evsignal_cb(int fd, short what, void *arg)
{
static char signals[100];
#ifdef WIN32
diff --git a/include/m_ctype.h b/include/m_ctype.h
index a5df71fa583..c2551b5d309 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -311,7 +311,9 @@ struct charset_info_st
#define ILLEGAL_CHARSET_INFO_NUMBER (~0U)
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_bin;
-extern struct charset_info_st my_charset_bin;
+extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1;
+extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_filename;
+
extern struct charset_info_st my_charset_big5_chinese_ci;
extern struct charset_info_st my_charset_big5_bin;
extern struct charset_info_st my_charset_cp932_japanese_ci;
@@ -324,7 +326,6 @@ extern struct charset_info_st my_charset_gb2312_chinese_ci;
extern struct charset_info_st my_charset_gb2312_bin;
extern struct charset_info_st my_charset_gbk_chinese_ci;
extern struct charset_info_st my_charset_gbk_bin;
-extern struct charset_info_st my_charset_latin1;
extern struct charset_info_st my_charset_latin1_german2_ci;
extern struct charset_info_st my_charset_latin1_bin;
extern struct charset_info_st my_charset_latin2_czech_ci;
@@ -341,7 +342,6 @@ extern struct charset_info_st my_charset_utf8_general_ci;
extern struct charset_info_st my_charset_utf8_unicode_ci;
extern struct charset_info_st my_charset_utf8_bin;
extern struct charset_info_st my_charset_cp1250_czech_ci;
-extern struct charset_info_st my_charset_filename;
/* declarations for simple charsets */
extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t,
diff --git a/include/my_global.h b/include/my_global.h
index 4b96f79ccc8..4f318988330 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -1522,6 +1522,9 @@ do { doubleget_union _tmp; \
#elif defined(HAVE_DLFCN_H)
#include <dlfcn.h>
#endif
+#ifndef HAVE_DLERROR
+#define dlerror() ""
+#endif
#endif
/* FreeBSD 2.2.2 does not define RTLD_NOW) */
@@ -1529,7 +1532,7 @@ do { doubleget_union _tmp; \
#define RTLD_NOW 1
#endif
-#ifndef HAVE_DLERROR
+#ifndef HAVE_DLOPEN
#define dlerror() "No support for dynamic loading (static build?)"
#define dlopen(A,B) 0
#define dlsym(A,B) 0
diff --git a/server-tools/CMakeLists.txt b/server-tools/CMakeLists.txt
index 3f02ba88f1d..9cfeb4e80f9 100644
--- a/server-tools/CMakeLists.txt
+++ b/server-tools/CMakeLists.txt
@@ -27,7 +27,7 @@ ADD_EXECUTABLE(mysqlmanager buffer.cc command.cc commands.cc guardian.cc instanc
user_management_commands.cc
../../sql/net_serv.cc ../../sql-common/pack.c ../../sql/password.c
../../sql/sql_state.c ../../sql-common/client.c ../../libmysql/get_password.c
- ../../libmysql/errmsg.c)
+ ../../libmysql/errmsg.c ../../sql-common/client_plugin.c)
ADD_DEPENDENCIES(mysqlmanager GenError)
TARGET_LINK_LIBRARIES(mysqlmanager dbug mysys strings taocrypt vio yassl zlib wsock32)
diff --git a/server-tools/instance-manager/CMakeLists.txt b/server-tools/instance-manager/CMakeLists.txt
index 4b9c386afe1..a1f24b2682d 100755
--- a/server-tools/instance-manager/CMakeLists.txt
+++ b/server-tools/instance-manager/CMakeLists.txt
@@ -28,7 +28,7 @@ ADD_EXECUTABLE(mysqlmanager buffer.cc command.cc commands.cc guardian.cc instanc
user_management_commands.cc ../../mysys/my_rnd.c
../../sql/net_serv.cc ../../sql-common/pack.c ../../sql/password.c
../../sql/sql_state.c ../../sql-common/client.c ../../libmysql/get_password.c
- ../../libmysql/errmsg.c)
+ ../../libmysql/errmsg.c ../../sql-common/client_plugin.c)
ADD_DEPENDENCIES(mysqlmanager GenError)
TARGET_LINK_LIBRARIES(mysqlmanager debug dbug mysys strings taocrypt vio yassl zlib wsock32)
diff --git a/sql-common/client.c b/sql-common/client.c
index 447518c9e5d..18f01661c0a 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -2345,7 +2345,7 @@ void mpvio_info(Vio *vio, MYSQL_PLUGIN_VIO_INFO *info)
case VIO_TYPE_SSL:
{
struct sockaddr addr;
- socklen_t addrlen= sizeof(addr);
+ SOCKET_SIZE_TYPE addrlen= sizeof(addr);
if (getsockname(vio->sd, &addr, &addrlen))
return;
info->protocol= addr.sa_family == AF_UNIX ?
@@ -2360,7 +2360,7 @@ void mpvio_info(Vio *vio, MYSQL_PLUGIN_VIO_INFO *info)
return;
case VIO_TYPE_SHARED_MEMORY:
info->protocol= MYSQL_VIO_MEMORY;
- info->handle= vio->handle_client_file_map; /* or what ? */
+ info->handle= vio->handle_file_map; /* or what ? */
return;
#endif
default: DBUG_ASSERT(0);
diff --git a/sql/client_settings.h b/sql/client_settings.h
index ed1e8d67cfe..850903a24e5 100644
--- a/sql/client_settings.h
+++ b/sql/client_settings.h
@@ -29,7 +29,6 @@
#define mysql_master_send_query(A, B, C) 1
#define mysql_slave_send_query(A, B, C) 1
#define mysql_rpl_probe(mysql) 0
-#undef HAVE_SMEM
#undef _CUSTOMCONFIG_
#define mysql_server_init(a,b,c) mysql_client_plugin_init()
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 62520246d21..43ea6dfcfed 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1716,8 +1716,7 @@ beg:
case MYSQL_TYPE_DATETIME:
{
- size_t d, t;
- uint64 i64= uint8korr(ptr); /* YYYYMMDDhhmmss */
+ uint64 d, t, i64= uint8korr(ptr); /* YYYYMMDDhhmmss */
d= i64 / 1000000;
t= i64 % 1000000;
my_b_printf(file, "%04d-%02d-%02d %02d:%02d:%02d",
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 77ff063eb54..f991cceb3fd 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -6645,8 +6645,6 @@ Can't be set to 1 if --log-slave-updates is used.",
{"shared-memory", OPT_ENABLE_SHARED_MEMORY,
"Enable the shared memory.",(uchar**) &opt_enable_shared_memory, (uchar**) &opt_enable_shared_memory,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
-#endif
-#ifdef HAVE_SMEM
{"shared-memory-base-name",OPT_SHARED_MEMORY_BASE_NAME,
"Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 593d1e68af0..656d9e03b71 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -924,7 +924,7 @@ void THD::update_stats(void)
/* A SQL query. */
if (lex->sql_command == SQLCOM_SELECT)
select_commands++;
- else if (! sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND)
+ else if (! (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND))
{
/* Ignore 'SHOW ' commands */
}
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 4eca294b60b..6e991eba2f8 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2529,8 +2529,8 @@ int send_user_stats(THD* thd, HASH *all_user_stats, TABLE *table)
table->field[j++]->store(user_stats->user, user_stats->user_name_length,
system_charset_info);
table->field[j++]->store((longlong)user_stats->total_connections,TRUE);
- table->field[j++]->store((longlong)user_stats->concurrent_connections);
- table->field[j++]->store((longlong)user_stats->connected_time);
+ table->field[j++]->store((longlong)user_stats->concurrent_connections, TRUE);
+ table->field[j++]->store((longlong)user_stats->connected_time, TRUE);
table->field[j++]->store((double)user_stats->busy_time);
table->field[j++]->store((double)user_stats->cpu_time);
table->field[j++]->store((longlong)user_stats->bytes_received, TRUE);
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c
index a450629e3f9..8bc086c8e8b 100644
--- a/storage/maria/ma_loghandler.c
+++ b/storage/maria/ma_loghandler.c
@@ -1274,10 +1274,11 @@ static my_bool translog_set_lsn_for_files(uint32 from_file, uint32 to_file,
for (file= from_file; file <= to_file; file++)
{
LOGHANDLER_FILE_INFO info;
- LINT_INIT(info.max_lsn);
-
File fd= open_logfile_by_number_no_cache(file);
+
LINT_INIT_STRUCT(info);
+ LINT_INIT(info.max_lsn);
+
if ((fd < 0) ||
((translog_read_file_header(&info, fd) ||
(cmp_translog_addr(lsn, info.max_lsn) > 0 &&