Skip to content

Commit

Permalink
Merge branch '10.0' into 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Jan 25, 2016
2 parents 2ff65ba + 666b966 commit f4faac4
Show file tree
Hide file tree
Showing 32 changed files with 1,461 additions and 318 deletions.
1 change: 1 addition & 0 deletions BUILD/SETUP.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Usage: $0 [-h|-n] [configure-options]
-h, --help Show this help message.
-n, --just-print Don't actually run any commands; just print them.
-c, --just-configure Stop after running configure.
Combined with --just-print shows configure options.
--extra-configs=xxx Add this to configure options
--extra-flags=xxx Add this C and CXX flags
--extra-cflags=xxx Add this to C flags
Expand Down
5 changes: 3 additions & 2 deletions client/mysqltest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4977,12 +4977,13 @@ static int my_kill(int pid, int sig)
{
#ifdef __WIN__
HANDLE proc;
if ((proc= OpenProcess(PROCESS_TERMINATE, FALSE, pid)) == NULL)
if ((proc= OpenProcess(SYNCHRONIZE|PROCESS_TERMINATE, FALSE, pid)) == NULL)
return -1;
if (sig == 0)
{
DWORD wait_result= WaitForSingleObject(proc, 0);
CloseHandle(proc);
return 0;
return wait_result == WAIT_OBJECT_0?-1:0;
}
(void)TerminateProcess(proc, 201);
CloseHandle(proc);
Expand Down
5 changes: 5 additions & 0 deletions cmake/libutils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ MACRO(CREATE_EXPORT_FILE VAR TARGET API_FUNCTIONS)
ENDFOREACH()
SET(CONTENT "${CONTENT} (void *)0\n}\;")
CONFIGURE_FILE_CONTENT(${CONTENT} ${EXPORTS})
# Avoid "function redeclared as variable" error
# when using gcc/clang option -flto(link time optimization)
IF(" ${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} " MATCHES " -flto")
SET_SOURCE_FILES_PROPERTIES(${EXPORTS} PROPERTIES COMPILE_FLAGS "-fno-lto")
ENDIF()
SET(${VAR} ${EXPORTS})
ENDIF()
ENDMACRO()
Expand Down
2 changes: 1 addition & 1 deletion include/violite.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void vio_end(void);

/* shutdown(2) flags */
#ifndef SHUT_RD
#define SHUT_RD SD_BOTH
#define SHUT_RD SD_RECEIVE
#endif

/*
Expand Down
8 changes: 7 additions & 1 deletion mysql-test/extra/rpl_tests/rpl_flsh_tbls.test
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ drop table t1;
connection slave;
flush tables with read lock;
start slave;
source include/wait_for_slave_to_start.inc;

# The IO thread will not be able to read the GTID because of flush tables
let $slave_param= Slave_IO_Running;
let $slave_param_value= Preparing;
source include/wait_for_slave_param.inc;

--source include/wait_for_slave_sql_to_start.inc
--error 1192
stop slave;

Expand Down
5 changes: 4 additions & 1 deletion mysql-test/suite/plugins/r/server_audit.result
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ server_audit_file_rotate_now OFF
server_audit_file_rotate_size 1000000
server_audit_file_rotations 9
server_audit_incl_users
server_audit_loc_info
server_audit_logging OFF
server_audit_mode 0
server_audit_output_type file
Expand Down Expand Up @@ -71,6 +72,7 @@ server_audit_file_rotate_now OFF
server_audit_file_rotate_size 1000000
server_audit_file_rotations 9
server_audit_incl_users odin, root, dva, tri
server_audit_loc_info
server_audit_logging ON
server_audit_mode 0
server_audit_output_type file
Expand Down Expand Up @@ -216,6 +218,7 @@ server_audit_file_rotate_now OFF
server_audit_file_rotate_size 1000000
server_audit_file_rotations 9
server_audit_incl_users odin, root, dva, tri
server_audit_loc_info
server_audit_logging ON
server_audit_mode 1
server_audit_output_type file
Expand Down Expand Up @@ -289,7 +292,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,proc,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proc,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,event,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,sa_db,,0
TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,,,0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
Expand Down
5 changes: 4 additions & 1 deletion mysql-test/suite/plugins/r/thread_pool_server_audit.result
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ server_audit_file_rotate_now OFF
server_audit_file_rotate_size 1000000
server_audit_file_rotations 9
server_audit_incl_users
server_audit_loc_info
server_audit_logging OFF
server_audit_mode 0
server_audit_output_type file
Expand Down Expand Up @@ -71,6 +72,7 @@ server_audit_file_rotate_now OFF
server_audit_file_rotate_size 1000000
server_audit_file_rotations 9
server_audit_incl_users odin, root, dva, tri
server_audit_loc_info
server_audit_logging ON
server_audit_mode 0
server_audit_output_type file
Expand Down Expand Up @@ -216,6 +218,7 @@ server_audit_file_rotate_now OFF
server_audit_file_rotate_size 1000000
server_audit_file_rotations 9
server_audit_incl_users odin, root, dva, tri
server_audit_loc_info
server_audit_logging ON
server_audit_mode 1
server_audit_output_type file
Expand Down Expand Up @@ -289,7 +292,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,proc,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proc,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,event,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,sa_db,,0
TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,,,0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
Expand Down
3 changes: 2 additions & 1 deletion mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ include/wait_for_slave_to_stop.inc
drop table t1;
flush tables with read lock;
start slave;
include/wait_for_slave_to_start.inc
include/wait_for_slave_param.inc [Slave_IO_Running]
include/wait_for_slave_sql_to_start.inc
stop slave;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
unlock tables;
Expand Down
8 changes: 8 additions & 0 deletions mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ DROP TABLE t1;
[connection slave]
include/install_semisync.inc
[connection slave]
show global status like "Slave%_running";
Variable_name Value
Slave_running ON
Slaves_running 1
UNINSTALL PLUGIN rpl_semi_sync_slave;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
plugin_name plugin_status
rpl_semi_sync_slave DELETED
[connection master]
show global status like "Slave%_connect%";
Variable_name Value
Slave_connections 2
Slaves_connected 1
UNINSTALL PLUGIN rpl_semi_sync_master;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
Expand Down
3 changes: 2 additions & 1 deletion mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ include/wait_for_slave_to_stop.inc
drop table t1;
flush tables with read lock;
start slave;
include/wait_for_slave_to_start.inc
include/wait_for_slave_param.inc [Slave_IO_Running]
include/wait_for_slave_sql_to_start.inc
stop slave;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
unlock tables;
Expand Down
6 changes: 6 additions & 0 deletions mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,19 @@ DROP TABLE t1;
# possible at this state
--connection slave
--echo [connection slave]
show global status like "Slave%_running";

UNINSTALL PLUGIN rpl_semi_sync_slave;
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';

# Step 2.3: Check that rpl_semi_sync_master uninstallation on Master is not
# possible at this state
--connection master
--echo [connection master]

# The following is to catch errors if the next uninstall plugin would succeed
show global status like "Slave%_connect%";

UNINSTALL PLUGIN rpl_semi_sync_master;
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';

Expand Down
2 changes: 2 additions & 0 deletions mysys/file_logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */


#ifndef FLOGGER_SKIP_INCLUDES
#include "my_global.h"
#include <my_sys.h>
#include <m_string.h>
#include <mysql/service_logger.h>
#include <my_pthread.h>
#endif /*FLOGGER_SKIP_INCLUDES*/

#ifndef flogger_mutex_init
#define flogger_mutex_init(A,B,C) mysql_mutex_init(A,B,C)
Expand Down
5 changes: 4 additions & 1 deletion plugin/server_audit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

MYSQL_ADD_PLUGIN(server_audit server_audit.c MODULE_ONLY)
SET(SERVER_AUDIT_SOURCES
server_audit.c test_audit_v4.c plugin_audit_v4.h)

MYSQL_ADD_PLUGIN(server_audit ${SERVER_AUDIT_SOURCES} MODULE_ONLY)
Loading

0 comments on commit f4faac4

Please sign in to comment.