Fixed compile warnings
Fixed some mtr test problems dbug/tests.c: Fixed compiler warnings mysql-test/r/handlersocket.result: Fixed that plugin_license is written mysql-test/suite/innodb/t/innodb_bug60196.test: Force sorted results as it was sometimes different on windows mysql-test/suite/rpl/t/rpl_heartbeat_basic.test: Prolong test as this failed on windows mysql-test/t/handlersocket.test: Fixed that plugin_license is written plugin/handler_socket/handlersocket/handlersocket.cpp: Use maria_declare_plugin plugin/handler_socket/handlersocket/mysql_incl.hpp: Fixed compiler warning plugin/handler_socket/libhsclient/auto_addrinfo.hpp: Fixed compiler warning sql/handler.h: Fixed typo sql/sql_plugin.cc: Fixed bug that caused plugin library name twice in error message storage/maria/ma_checkpoint.c: Fixed compiler warning storage/maria/ma_loghandler.c: Fixed compiler warning unittest/mysys/base64-t.c: Fixed compiler warning unittest/mysys/bitmap-t.c: Fixed compiler warning unittest/mysys/my_malloc-t.c: Fixed compiler warning
This commit is contained in:
parent
d4d3ca204f
commit
960f6600c8
@ -36,7 +36,8 @@ int func1()
|
|||||||
DBUG_RETURN(10);
|
DBUG_RETURN(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main (int argc, char *argv[])
|
int main (int argc __attribute__((unused)),
|
||||||
|
char *argv[] __attribute__((unused)))
|
||||||
{
|
{
|
||||||
#ifdef DBUG_OFF
|
#ifdef DBUG_OFF
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
install plugin handlersocket soname 'handlersocket.so';
|
install plugin handlersocket soname 'handlersocket.so';
|
||||||
select plugin_name, plugin_version, plugin_status, plugin_type, plugin_library, plugin_library_version, plugin_author, plugin_description plugin_license, plugin_maturity, plugin_auth_version from information_schema.plugins where plugin_name = 'handlersocket';
|
select plugin_name, plugin_version, plugin_status, plugin_type, plugin_library, plugin_library_version, plugin_author, plugin_description, plugin_license, plugin_maturity, plugin_auth_version from information_schema.plugins where plugin_name = 'handlersocket';
|
||||||
plugin_name handlersocket
|
plugin_name handlersocket
|
||||||
plugin_version 1.0
|
plugin_version 1.0
|
||||||
plugin_status ACTIVE
|
plugin_status ACTIVE
|
||||||
plugin_type DAEMON
|
plugin_type DAEMON
|
||||||
plugin_library handlersocket.so
|
plugin_library handlersocket.so
|
||||||
plugin_library_version 0.0
|
plugin_library_version 1.3
|
||||||
plugin_author higuchi dot akira at dena dot jp
|
plugin_author higuchi dot akira at dena dot jp
|
||||||
plugin_license
|
plugin_description Direct access into InnoDB
|
||||||
plugin_maturity Unknown
|
plugin_license BSD
|
||||||
plugin_auth_version Unknown
|
plugin_maturity Beta
|
||||||
|
plugin_auth_version 1.0
|
||||||
uninstall plugin handlersocket;
|
uninstall plugin handlersocket;
|
||||||
|
@ -77,6 +77,7 @@ SELECT * FROM Bug_60196;
|
|||||||
INSERT INTO Bug_60196 VALUES (2, 1);
|
INSERT INTO Bug_60196 VALUES (2, 1);
|
||||||
INSERT INTO Bug_60196 VALUES (2, 2);
|
INSERT INTO Bug_60196 VALUES (2, 2);
|
||||||
INSERT INTO Bug_60196 VALUES (2, 3);
|
INSERT INTO Bug_60196 VALUES (2, 3);
|
||||||
|
--sorted_result
|
||||||
SELECT * FROM Bug_60196;
|
SELECT * FROM Bug_60196;
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
|
@ -324,7 +324,7 @@ call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received w
|
|||||||
let $slave_errno= ER_DUP_ENTRY
|
let $slave_errno= ER_DUP_ENTRY
|
||||||
--source include/wait_for_slave_sql_error.inc
|
--source include/wait_for_slave_sql_error.inc
|
||||||
let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
|
let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
|
||||||
sleep 2;
|
sleep 4;
|
||||||
let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
|
let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
|
||||||
let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) > 0 AS Result, Result, 1);
|
let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) > 0 AS Result, Result, 1);
|
||||||
--echo Heartbeat events are received while sql thread stopped (1 means 'yes'): $result
|
--echo Heartbeat events are received while sql thread stopped (1 means 'yes'): $result
|
||||||
|
@ -5,6 +5,6 @@ if (`select length('$HANDLERSOCKET_SO') = 0`) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
install plugin handlersocket soname 'handlersocket.so';
|
install plugin handlersocket soname 'handlersocket.so';
|
||||||
--query_vertical select plugin_name, plugin_version, plugin_status, plugin_type, plugin_library, plugin_library_version, plugin_author, plugin_description plugin_license, plugin_maturity, plugin_auth_version from information_schema.plugins where plugin_name = 'handlersocket'
|
--query_vertical select plugin_name, plugin_version, plugin_status, plugin_type, plugin_library, plugin_library_version, plugin_author, plugin_description, plugin_license, plugin_maturity, plugin_auth_version from information_schema.plugins where plugin_name = 'handlersocket'
|
||||||
uninstall plugin handlersocket;
|
uninstall plugin handlersocket;
|
||||||
|
|
||||||
|
@ -197,20 +197,20 @@ static SHOW_VAR daemon_handlersocket_status_variables[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
mysql_declare_plugin(handlersocket)
|
maria_declare_plugin(handlersocket)
|
||||||
{
|
{
|
||||||
MYSQL_DAEMON_PLUGIN,
|
MYSQL_DAEMON_PLUGIN,
|
||||||
&daemon_handlersocket_plugin,
|
&daemon_handlersocket_plugin,
|
||||||
"handlersocket",
|
"handlersocket",
|
||||||
"higuchi dot akira at dena dot jp",
|
"higuchi dot akira at dena dot jp",
|
||||||
"",
|
"Direct access into InnoDB",
|
||||||
PLUGIN_LICENSE_BSD,
|
PLUGIN_LICENSE_BSD,
|
||||||
daemon_handlersocket_init,
|
daemon_handlersocket_init,
|
||||||
daemon_handlersocket_deinit,
|
daemon_handlersocket_deinit,
|
||||||
0x0100 /* 1.0 */,
|
0x0100 /* 1.0 */,
|
||||||
daemon_handlersocket_status_variables,
|
daemon_handlersocket_status_variables,
|
||||||
daemon_handlersocket_system_variables,
|
daemon_handlersocket_system_variables,
|
||||||
0
|
"1.0",
|
||||||
|
MariaDB_PLUGIN_MATURITY_BETA
|
||||||
}
|
}
|
||||||
mysql_declare_plugin_end;
|
maria_declare_plugin_end;
|
||||||
|
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
#include <sql_base.h>
|
#include <sql_base.h>
|
||||||
// FIXME FIXME FIXME
|
// FIXME FIXME FIXME
|
||||||
#define safeFree(X) my_free(X)
|
#define safeFree(X) my_free(X)
|
||||||
|
#undef pthread_cond_timedwait
|
||||||
|
#undef pthread_mutex_lock
|
||||||
|
#undef pthread_mutex_unlock
|
||||||
#define pthread_cond_timedwait mysql_cond_timedwait
|
#define pthread_cond_timedwait mysql_cond_timedwait
|
||||||
#define pthread_mutex_lock mysql_mutex_lock
|
#define pthread_mutex_lock mysql_mutex_lock
|
||||||
#define pthread_mutex_unlock mysql_mutex_unlock
|
#define pthread_mutex_unlock mysql_mutex_unlock
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
#include <string.h>
|
||||||
#include "util.hpp"
|
#include "util.hpp"
|
||||||
|
|
||||||
typedef SOCKET_SIZE_TYPE size_socket;
|
typedef SOCKET_SIZE_TYPE size_socket;
|
||||||
@ -34,8 +34,9 @@ struct auto_addrinfo : private noncopyable {
|
|||||||
const addrinfo *get() const { return addr; }
|
const addrinfo *get() const { return addr; }
|
||||||
int resolve(const char *node, const char *service, int flags = 0,
|
int resolve(const char *node, const char *service, int flags = 0,
|
||||||
int family = AF_UNSPEC, int socktype = SOCK_STREAM, int protocol = 0) {
|
int family = AF_UNSPEC, int socktype = SOCK_STREAM, int protocol = 0) {
|
||||||
|
addrinfo hints;
|
||||||
reset();
|
reset();
|
||||||
addrinfo hints = { };
|
memset(&hints, 0, sizeof(hints));
|
||||||
hints.ai_flags = flags;
|
hints.ai_flags = flags;
|
||||||
hints.ai_family = family;
|
hints.ai_family = family;
|
||||||
hints.ai_socktype = socktype;
|
hints.ai_socktype = socktype;
|
||||||
|
@ -1063,7 +1063,7 @@ inline LEX_STRING *hton_name(const handlerton *hton)
|
|||||||
#define HTON_NO_FLAGS 0
|
#define HTON_NO_FLAGS 0
|
||||||
#define HTON_CLOSE_CURSORS_AT_COMMIT (1 << 0)
|
#define HTON_CLOSE_CURSORS_AT_COMMIT (1 << 0)
|
||||||
#define HTON_ALTER_NOT_SUPPORTED (1 << 1) //Engine does not support alter
|
#define HTON_ALTER_NOT_SUPPORTED (1 << 1) //Engine does not support alter
|
||||||
#define HTON_CAN_RECREATE (1 << 2) //Delete all is used fro truncate
|
#define HTON_CAN_RECREATE (1 << 2) //Delete all is used for truncate
|
||||||
#define HTON_HIDDEN (1 << 3) //Engine does not appear in lists
|
#define HTON_HIDDEN (1 << 3) //Engine does not appear in lists
|
||||||
#define HTON_NOT_USER_SELECTABLE (1 << 5)
|
#define HTON_NOT_USER_SELECTABLE (1 << 5)
|
||||||
#define HTON_TEMPORARY_NOT_SUPPORTED (1 << 6) //Having temporary tables not supported
|
#define HTON_TEMPORARY_NOT_SUPPORTED (1 << 6) //Having temporary tables not supported
|
||||||
|
@ -739,15 +739,14 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
|
|||||||
}
|
}
|
||||||
bzero(&plugin_dl, sizeof(plugin_dl));
|
bzero(&plugin_dl, sizeof(plugin_dl));
|
||||||
/* Compile dll path */
|
/* Compile dll path */
|
||||||
dlpathlen=
|
strxnmov(dlpath, sizeof(dlpath) - 1, opt_plugin_dir, "/", dl->str, NullS);
|
||||||
strxnmov(dlpath, sizeof(dlpath) - 1, opt_plugin_dir, "/", dl->str, NullS) -
|
|
||||||
dlpath;
|
|
||||||
(void) unpack_filename(dlpath, dlpath);
|
(void) unpack_filename(dlpath, dlpath);
|
||||||
plugin_dl.ref_count= 1;
|
plugin_dl.ref_count= 1;
|
||||||
/* Open new dll handle */
|
/* Open new dll handle */
|
||||||
if (!(plugin_dl.handle= dlopen(dlpath, RTLD_NOW)))
|
if (!(plugin_dl.handle= dlopen(dlpath, RTLD_NOW)))
|
||||||
{
|
{
|
||||||
const char *errmsg=dlerror();
|
const char *errmsg=dlerror();
|
||||||
|
dlpathlen= strlen(dlpath);
|
||||||
if (!strncmp(dlpath, errmsg, dlpathlen))
|
if (!strncmp(dlpath, errmsg, dlpathlen))
|
||||||
{ // if errmsg starts from dlpath, trim this prefix.
|
{ // if errmsg starts from dlpath, trim this prefix.
|
||||||
errmsg+=dlpathlen;
|
errmsg+=dlpathlen;
|
||||||
|
@ -763,6 +763,8 @@ static int collect_tables(LEX_STRING *str, LSN checkpoint_start_log_horizon)
|
|||||||
PAGECACHE_FLUSH_FILTER filter;
|
PAGECACHE_FLUSH_FILTER filter;
|
||||||
DBUG_ENTER("collect_tables");
|
DBUG_ENTER("collect_tables");
|
||||||
|
|
||||||
|
LINT_INIT(state_copies_horizon);
|
||||||
|
|
||||||
/* let's make a list of distinct shares */
|
/* let's make a list of distinct shares */
|
||||||
mysql_mutex_lock(&THR_LOCK_maria);
|
mysql_mutex_lock(&THR_LOCK_maria);
|
||||||
for (nb= 0, pos= maria_open_list; pos; pos= pos->next)
|
for (nb= 0, pos= maria_open_list; pos; pos= pos->next)
|
||||||
|
@ -7474,6 +7474,8 @@ static void translog_force_current_buffer_to_finish()
|
|||||||
uint16 left= TRANSLOG_PAGE_SIZE - log_descriptor.bc.current_page_fill;
|
uint16 left= TRANSLOG_PAGE_SIZE - log_descriptor.bc.current_page_fill;
|
||||||
uint16 current_page_fill, write_counter, previous_offset;
|
uint16 current_page_fill, write_counter, previous_offset;
|
||||||
DBUG_ENTER("translog_force_current_buffer_to_finish");
|
DBUG_ENTER("translog_force_current_buffer_to_finish");
|
||||||
|
LINT_INIT(current_page_fill);
|
||||||
|
|
||||||
DBUG_PRINT("enter", ("Buffer #%u 0x%lx "
|
DBUG_PRINT("enter", ("Buffer #%u 0x%lx "
|
||||||
"Buffer addr: (%lu,0x%lx) "
|
"Buffer addr: (%lu,0x%lx) "
|
||||||
"Page addr: (%lu,0x%lx) "
|
"Page addr: (%lu,0x%lx) "
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#define BASE64_ROWS 4 /* Number of ok(..) */
|
#define BASE64_ROWS 4 /* Number of ok(..) */
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc,char *argv[])
|
main(int argc __attribute__((unused)),char *argv[])
|
||||||
{
|
{
|
||||||
int i, cmp;
|
int i, cmp;
|
||||||
size_t j, k, l, dst_len, needed_length;
|
size_t j, k, l, dst_len, needed_length;
|
||||||
|
@ -520,7 +520,7 @@ error:
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc,char *argv[])
|
int main(int argc __attribute__((unused)),char *argv[])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int const min_size = 1;
|
int const min_size = 1;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <my_sys.h>
|
#include <my_sys.h>
|
||||||
#include "tap.h"
|
#include "tap.h"
|
||||||
|
|
||||||
int main(int argc,char *argv[])
|
int main(int argc __attribute__((unused)),char *argv[])
|
||||||
{
|
{
|
||||||
void *p;
|
void *p;
|
||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user