Commit 98e61598 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.2 into 10.3

parents 72753d2b d0785f77
...@@ -15,6 +15,18 @@ ...@@ -15,6 +15,18 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
# Setting build type to RelWithDebInfo as none was specified.
# Must occur before PROJECT
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel"
FORCE)
# Set the possible values of build type for cmake-gui
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"None" "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
ENDIF()
PROJECT(MySQL) PROJECT(MySQL)
IF(POLICY CMP0022) IF(POLICY CMP0022)
...@@ -42,17 +54,6 @@ IF(NOT DEFINED MANUFACTURER) ...@@ -42,17 +54,6 @@ IF(NOT DEFINED MANUFACTURER)
MARK_AS_ADVANCED(MANUFACTURER) MARK_AS_ADVANCED(MANUFACTURER)
ENDIF() ENDIF()
IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
# Setting build type to RelWithDebInfo as none was specified.")
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel"
FORCE)
# Set the possible values of build type for cmake-gui
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"None" "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
ENDIF()
# MAX_INDEXES - Set the maximum number of indexes per table, default 64 # MAX_INDEXES - Set the maximum number of indexes per table, default 64
IF (NOT MAX_INDEXES) IF (NOT MAX_INDEXES)
SET(MAX_INDEXES 64) SET(MAX_INDEXES 64)
......
...@@ -97,11 +97,13 @@ ELSEIF(RPM) ...@@ -97,11 +97,13 @@ ELSEIF(RPM)
SET(WITH_ZLIB system CACHE STRING "") SET(WITH_ZLIB system CACHE STRING "")
SET(CHECKMODULE /usr/bin/checkmodule CACHE FILEPATH "") SET(CHECKMODULE /usr/bin/checkmodule CACHE FILEPATH "")
SET(SEMODULE_PACKAGE /usr/bin/semodule_package CACHE FILEPATH "") SET(SEMODULE_PACKAGE /usr/bin/semodule_package CACHE FILEPATH "")
SET(WITH_JEMALLOC "yes" CACHE STRING "")
ELSEIF(DEB) ELSEIF(DEB)
SET(WITH_SSL system CACHE STRING "") SET(WITH_SSL system CACHE STRING "")
SET(WITH_ZLIB system CACHE STRING "") SET(WITH_ZLIB system CACHE STRING "")
SET(WITH_LIBWRAP ON) SET(WITH_LIBWRAP ON)
SET(HAVE_EMBEDDED_PRIVILEGE_CONTROL ON) SET(HAVE_EMBEDDED_PRIVILEGE_CONTROL ON)
SET(WITH_JEMALLOC "yes" CACHE STRING "")
ELSE() ELSE()
SET(WITH_SSL bundled CACHE STRING "") SET(WITH_SSL bundled CACHE STRING "")
SET(WITH_PCRE bundled CACHE STRING "") SET(WITH_PCRE bundled CACHE STRING "")
......
...@@ -147,7 +147,7 @@ sub do_args($$$$$) { ...@@ -147,7 +147,7 @@ sub do_args($$$$$) {
my %vars = ( my %vars = (
vardir => $::opt_vardir, vardir => $::opt_vardir,
exe => $$exe, exe => $$exe,
args => join(' ', map { quote_from_mtr $_ } @$$args, '--gdb'), args => join(' ', map { quote_from_mtr $_ } @$$args, '--loose-gdb'),
input => $input, input => $input,
script => "$::opt_vardir/tmp/${k}init.$type", script => "$::opt_vardir/tmp/${k}init.$type",
log => "$::opt_vardir/log/$type.$k", log => "$::opt_vardir/log/$type.$k",
...@@ -158,7 +158,7 @@ sub do_args($$$$$) { ...@@ -158,7 +158,7 @@ sub do_args($$$$$) {
my $script = join "\n", @params; my $script = join "\n", @params;
if ($v->{script}) { if ($v->{script}) {
::mtr_tofile($vars{script}, subst($v->{script}, %vars)."\n".$script); ::mtr_tonewfile($vars{script}, subst($v->{script}, %vars)."\n".$script);
} elsif ($script) { } elsif ($script) {
die "$k is not using a script file, nowhere to write the script \n---\n$script\n---\n"; die "$k is not using a script file, nowhere to write the script \n---\n$script\n---\n";
} }
......
--source include/windows.inc --source include/windows.inc
if (!$AUTH_NAMED_PIPE_SO)
{
skip No auth_named_pipe plugin;
}
INSTALL SONAME 'auth_named_pipe'; INSTALL SONAME 'auth_named_pipe';
--replace_result $USERNAME USERNAME --replace_result $USERNAME USERNAME
......
...@@ -371,6 +371,32 @@ XA ROLLBACK 'xid'; ...@@ -371,6 +371,32 @@ XA ROLLBACK 'xid';
DROP TABLE t1; DROP TABLE t1;
disconnect con1; disconnect con1;
connection default; connection default;
#
# XA states and SHOW commands
#
create table t1 (pk int primary key) engine=innodb;
xa start 'foo';
insert t1 set pk=1;
xa end 'foo';
xa prepare 'foo';
show status like 'foo';
Variable_name Value
select table_name,table_comment from information_schema.tables where table_schema='test';
table_name t1
table_comment
select table_name,table_rows,table_comment from information_schema.tables where table_schema='test';
table_name t1
table_rows NULL
table_comment XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
Warnings:
Level Warning
Code 1399
Message XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
xa commit 'foo';
drop table t1;
#
# End of 10.2 tests
#
XA BEGIN 'xid'; XA BEGIN 'xid';
CREATE TEMPORARY SEQUENCE s; CREATE TEMPORARY SEQUENCE s;
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state
......
...@@ -517,6 +517,24 @@ connection default; ...@@ -517,6 +517,24 @@ connection default;
--source include/wait_until_count_sessions.inc --source include/wait_until_count_sessions.inc
--echo #
--echo # XA states and SHOW commands
--echo #
create table t1 (pk int primary key) engine=innodb;
xa start 'foo';
insert t1 set pk=1;
xa end 'foo';
xa prepare 'foo';
show status like 'foo';
--query_vertical select table_name,table_comment from information_schema.tables where table_schema='test'
--query_vertical select table_name,table_rows,table_comment from information_schema.tables where table_schema='test'
xa commit 'foo';
drop table t1;
--echo #
--echo # End of 10.2 tests
--echo #
# #
# MDEV-22002 Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' # MDEV-22002 Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'
# failed upon CREATE TEMPORARY SEQUENCE under XA # failed upon CREATE TEMPORARY SEQUENCE under XA
......
...@@ -28,3 +28,6 @@ sql_log_bin : MDEV-21491 galera.sql_log_bin ...@@ -28,3 +28,6 @@ sql_log_bin : MDEV-21491 galera.sql_log_bin
versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
galera_wsrep_provider_unset_set: wsrep_provider is read-only for security reasons galera_wsrep_provider_unset_set: wsrep_provider is read-only for security reasons
pxc-421: wsrep_provider is read-only for security reasons pxc-421: wsrep_provider is read-only for security reasons
galera_sst_xtrabackup-v2: Test fails due to innodb issues
galera_sst_xtrabackup-v2_encrypt_with_key: Test fails due to innodb issues
galera_sst_xtrabackup-v2_data_dir: Test fails due to innodb issues
call mtr.add_suppression("WSREP: write_handler(): protocol is shutdown");
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
connection node_1; connection node_1;
call mtr.add_suppression("WSREP: write_handler(): protocol is shutdown.*"); call mtr.add_suppression("WSREP: write_handler(): protocol is shutdown.*");
connection node_2; connection node_2;
...@@ -12,6 +5,14 @@ call mtr.add_suppression("WSREP: write_handler(): protocol is shutdown.*"); ...@@ -12,6 +5,14 @@ call mtr.add_suppression("WSREP: write_handler(): protocol is shutdown.*");
connection node_1; connection node_1;
connection node_2; connection node_2;
connection node_1; connection node_1;
connection node_2;
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
connection node_1;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2 VARIABLE_VALUE = 2
1 1
...@@ -23,3 +24,5 @@ connection node_1; ...@@ -23,3 +24,5 @@ connection node_1;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2 VARIABLE_VALUE = 2
1 1
disconnect node_2;
disconnect node_1;
SELECT 1; SELECT 1;
1 1
1 1
include/assert_grep.inc [Using openssl based encryption with socat]
SELECT 1;
1
1
include/assert_grep.inc [Using openssl based encryption with socat]
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_ssl_communication.inc --source include/have_ssl_communication.inc
call mtr.add_suppression("WSREP: write_handler(): protocol is shutdown");
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_1 --connection node_1
call mtr.add_suppression("WSREP: write_handler(): protocol is shutdown.*"); call mtr.add_suppression("WSREP: write_handler(): protocol is shutdown.*");
--connection node_2 --connection node_2
call mtr.add_suppression("WSREP: write_handler(): protocol is shutdown.*"); call mtr.add_suppression("WSREP: write_handler(): protocol is shutdown.*");
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
# Setup galera ports # Setup galera ports
--connection node_1 --connection node_1
--source suite/galera/include/galera_base_port.inc --source suite/galera/include/galera_base_port.inc
...@@ -27,6 +27,9 @@ call mtr.add_suppression("WSREP: write_handler(): protocol is shutdown.*"); ...@@ -27,6 +27,9 @@ call mtr.add_suppression("WSREP: write_handler(): protocol is shutdown.*");
--source suite/galera/include/galera_base_port.inc --source suite/galera/include/galera_base_port.inc
--let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT --let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
# 2. Restart node #1 with a socket.ssl_ca that includes both the new and the old certificate # 2. Restart node #1 with a socket.ssl_ca that includes both the new and the old certificate
--connection node_1 --connection node_1
...@@ -65,3 +68,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N ...@@ -65,3 +68,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
# Upgrade complete. Both nodes now use the new key and certificate # Upgrade complete. Both nodes now use the new key and certificate
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
--source include/galera_end.inc
# #
# This test checks that key and cert encryption options can be passed to mariabackup via the my.cnf file # This test checks that key and cert encryption options can be passed to
# Initial SST happens via mariabackup, so there is not much to do in the body of the test # mariabackup via the my.cnf file
# Initial SST happens via mariabackup, so there is not much to do in the body
# of the test
# #
--source include/big_test.inc --source include/big_test.inc
...@@ -12,3 +14,11 @@ SELECT 1; ...@@ -12,3 +14,11 @@ SELECT 1;
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc --source include/wait_condition.inc
# Confirm that transfer was SSL-encrypted
--let $assert_text = Using openssl based encryption with socat
--let $assert_select = Using openssl based encryption with socat: with key and crt
--let $assert_count = 1
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_only_after = CURRENT_TEST
--source include/assert_grep.inc
!include ../galera_2nodes.cnf
[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
wsrep_debug=ON
ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/client-cert.pem
ssl-key=@ENV.MYSQL_TEST_DIR/std_data/client-key.pem
ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
[sst]
ssl-mode=VERIFY_CA
\ No newline at end of file
#
# This test checks that if SST SSL is not explicitly donfigured mariabackup SST
# uses server SSL configuration if present.
# Initial SST happens via mariabackup, so there is not much to do in the body
# of the test
#
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_mariabackup.inc
--source include/have_ssl_communication.inc
SELECT 1;
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
# Confirm that transfer was SSL-encrypted
--let $assert_text = Using openssl based encryption with socat
--let $assert_select = Using openssl based encryption with socat: with key and c
--let $assert_count = 1
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_only_after = CURRENT_TEST
--source include/assert_grep.inc
!include ../galera_2nodes.cnf
[mysqld]
wsrep_sst_method=rsync
[sst]
tkey=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem
tcert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_debug.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
--connection node_2
CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory");
--connection node_1
--source suite/galera/include/galera_st_shutdown_slave.inc
--source suite/galera/include/galera_st_clean_slave.inc
--source suite/galera/include/galera_st_kill_slave.inc
--source suite/galera/include/galera_st_kill_slave_ddl.inc
# Confirm that transfer was SSL-encrypted
--let $assert_text = Using stunnel for SSL encryption
--let $assert_select = Using stunnel for SSL encryption
--let $assert_count = 5
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_only_after = CURRENT_TEST
--source include/assert_grep.inc
--source include/auto_increment_offset_restore.inc
!include ../galera_2nodes.cnf
[mysqld]
wsrep_sst_method=rsync
ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/client-cert.pem
ssl-key=@ENV.MYSQL_TEST_DIR/std_data/client-key.pem
ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
[sst]
ssl-mode=VERIFY_CA
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_debug.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
--connection node_2
CALL mtr.add_suppression("\\[ERROR\\] .*ib_buffer_pool' for reading: No such file or directory");
--connection node_1
--source suite/galera/include/galera_st_shutdown_slave.inc
--source suite/galera/include/galera_st_clean_slave.inc
--source suite/galera/include/galera_st_kill_slave.inc
--source suite/galera/include/galera_st_kill_slave_ddl.inc
# Confirm that transfer was SSL-encrypted
--let $assert_text = Using stunnel for SSL encryption
--let $assert_select = Using stunnel for SSL encryption
--let $assert_count = 5
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_only_after = CURRENT_TEST
--source include/assert_grep.inc
--source include/auto_increment_offset_restore.inc
...@@ -12,10 +12,6 @@ ...@@ -12,10 +12,6 @@
GAL-501 : MDEV-24645 galera_3nodes.GAL-501 MTR failed: failed to open gcomm backend connection: 110 GAL-501 : MDEV-24645 galera_3nodes.GAL-501 MTR failed: failed to open gcomm backend connection: 110
galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_gtid_2_cluster galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_gtid_2_cluster
galera_ipv6_mariabackup : MDEV-24440: galera_3nodes.galera_ipv6_mariabackup MTR fails sporadically: Failed to read from: wsrep_sst_mariabackup --role 'donor' --address '[::1]:16028/xtrabackup_sst//1'
galera_ipv6_mariabackup_section : MDEV-22195: galera_3nodes.galera_ipv6_mariabackup_section MTR failed: assert_grep.inc failed
galera_ipv6_mysqldump : MDEV-24036: galera_3nodes.galera_ipv6_mysqldump: rare random crashes during shutdown
galera_ipv6_rsync_section : MDEV-23580: galera_3nodes.galera_ipv6_rsync_section MTR failed: WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(} galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(}
galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query
galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query
......
...@@ -572,8 +572,12 @@ then ...@@ -572,8 +572,12 @@ then
echo echo
echo echo
echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !" echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !"
echo "To do so, start the server, then issue the following command:" echo "To do so, start the server, then issue the following commands:"
echo echo
echo "'$bindir/mysqladmin' -u root password 'new-password'"
echo "'$bindir/mysqladmin' -u root -h $hostname password 'new-password'"
echo
echo "Alternatively you can run:"
echo "'$bindir/mysql_secure_installation'" echo "'$bindir/mysql_secure_installation'"
echo echo
echo "which will also give you the option of removing the test" echo "which will also give you the option of removing the test"
......
This diff is collapsed.
This diff is collapsed.
#!/bin/bash -ue #!/bin/bash -ue
# Copyright (C) 2009-2015 Codership Oy # Copyright (C) 2009-2015 Codership Oy
# Copyright (C) 2017-2021 MariaDB
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
...@@ -25,6 +26,7 @@ EINVAL=22 ...@@ -25,6 +26,7 @@ EINVAL=22
local_ip() local_ip()
{ {
[ "$1" = "127.0.0.1" ] && return 0 [ "$1" = "127.0.0.1" ] && return 0
[ "$1" = "127.0.0.2" ] && return 0
[ "$1" = "localhost" ] && return 0 [ "$1" = "localhost" ] && return 0
[ "$1" = "[::1]" ] && return 0 [ "$1" = "[::1]" ] && return 0
[ "$1" = "$(hostname -s)" ] && return 0 [ "$1" = "$(hostname -s)" ] && return 0
...@@ -138,8 +140,8 @@ then ...@@ -138,8 +140,8 @@ then
# turned off for the session so that gtid state does not get altered while # turned off for the session so that gtid state does not get altered while
# the dump gets replayed on joiner. # the dump gets replayed on joiner.
if [[ "$LOG_BIN" == 'ON' ]]; then if [[ "$LOG_BIN" == 'ON' ]]; then
RESET_MASTER="RESET MASTER;" RESET_MASTER="SET GLOBAL wsrep_on=OFF; RESET MASTER; SET GLOBAL wsrep_on=ON;"
SET_GTID_BINLOG_STATE="SET @@global.gtid_binlog_state='$GTID_BINLOG_STATE';" SET_GTID_BINLOG_STATE="SET GLOBAL wsrep_on=OFF; SET @@global.gtid_binlog_state='$GTID_BINLOG_STATE'; SET GLOBAL wsrep_on=ON;"
SQL_LOG_BIN_OFF="SET @@session.sql_log_bin=OFF;" SQL_LOG_BIN_OFF="SET @@session.sql_log_bin=OFF;"
fi fi
fi fi
......
This diff is collapsed.
...@@ -4103,13 +4103,19 @@ bool open_tables(THD *thd, const DDL_options_st &options, ...@@ -4103,13 +4103,19 @@ bool open_tables(THD *thd, const DDL_options_st &options,
bool has_prelocking_list; bool has_prelocking_list;
DBUG_ENTER("open_tables"); DBUG_ENTER("open_tables");
/* Accessing data in XA_IDLE or XA_PREPARED is not allowed. */ /* Data access in XA transaction is only allowed when it is active. */
for (TABLE_LIST *table= *start; table; table= table->next_global)
if (!table->schema_table)
{
enum xa_states xa_state= thd->transaction.xid_state.xa_state; enum xa_states xa_state= thd->transaction.xid_state.xa_state;
if (*start && (xa_state == XA_IDLE || xa_state == XA_PREPARED)) if (xa_state == XA_IDLE || xa_state == XA_PREPARED)
{ {
my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]); my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]);
DBUG_RETURN(true); DBUG_RETURN(true);
} }
else
break;
}
thd->current_tablenr= 0; thd->current_tablenr= 0;
restart: restart:
......
...@@ -632,48 +632,29 @@ static void* sst_joiner_thread (void* a) ...@@ -632,48 +632,29 @@ static void* sst_joiner_thread (void* a)
} }
#define WSREP_SST_AUTH_ENV "WSREP_SST_OPT_AUTH" #define WSREP_SST_AUTH_ENV "WSREP_SST_OPT_AUTH"
#define WSREP_SST_REMOTE_AUTH_ENV "WSREP_SST_OPT_REMOTE_AUTH"
static int sst_append_auth_env(wsp::env& env, const char* sst_auth)
{
int const sst_auth_size= strlen(WSREP_SST_AUTH_ENV) + 1 /* = */
+ (sst_auth ? strlen(sst_auth) : 0) + 1 /* \0 */;
wsp::string sst_auth_str(sst_auth_size); // for automatic cleanup on return
if (!sst_auth_str()) return -ENOMEM;
int ret= snprintf(sst_auth_str(), sst_auth_size, "%s=%s",
WSREP_SST_AUTH_ENV, sst_auth ? sst_auth : "");
if (ret < 0 || ret >= sst_auth_size)
{
WSREP_ERROR("sst_append_auth_env(): snprintf() failed: %d", ret);
return (ret < 0 ? ret : -EMSGSIZE);
}
env.append(sst_auth_str());
return -env.error();
}
#define DATA_HOME_DIR_ENV "INNODB_DATA_HOME_DIR" #define DATA_HOME_DIR_ENV "INNODB_DATA_HOME_DIR"
static int sst_append_data_dir(wsp::env& env, const char* data_dir) static int sst_append_env_var(wsp::env& env,
const char* const var,
const char* const val)
{ {
int const data_dir_size= strlen(DATA_HOME_DIR_ENV) + 1 /* = */ int const env_str_size= strlen(var) + 1 /* = */
+ (data_dir ? strlen(data_dir) : 0) + 1 /* \0 */; + (val ? strlen(val) : 0) + 1 /* \0 */;
wsp::string data_dir_str(data_dir_size); // for automatic cleanup on return wsp::string env_str(env_str_size); // for automatic cleanup on return
if (!data_dir_str()) return -ENOMEM; if (!env_str()) return -ENOMEM;
int ret= snprintf(data_dir_str(), data_dir_size, "%s=%s", int ret= snprintf(env_str(), env_str_size, "%s=%s", var, val ? val : "");
DATA_HOME_DIR_ENV, data_dir ? data_dir : "");
if (ret < 0 || ret >= data_dir_size) if (ret < 0 || ret >= env_str_size)
{ {
WSREP_ERROR("sst_append_data_dir(): snprintf() failed: %d", ret); WSREP_ERROR("sst_append_env_var(): snprintf(%s=%s) failed: %d",
var, val, ret);
return (ret < 0 ? ret : -EMSGSIZE); return (ret < 0 ? ret : -EMSGSIZE);
} }
env.append(data_dir_str()); env.append(env_str());
return -env.error(); return -env.error();
} }
...@@ -1084,7 +1065,7 @@ static ssize_t sst_prepare_other (const char* method, ...@@ -1084,7 +1065,7 @@ static ssize_t sst_prepare_other (const char* method,
return -env.error(); return -env.error();
} }
if ((ret= sst_append_auth_env(env, sst_auth))) if ((ret= sst_append_env_var(env, WSREP_SST_AUTH_ENV, sst_auth)))
{ {
WSREP_ERROR("sst_prepare_other(): appending auth failed: %d", ret); WSREP_ERROR("sst_prepare_other(): appending auth failed: %d", ret);
return ret; return ret;
...@@ -1092,7 +1073,7 @@ static ssize_t sst_prepare_other (const char* method, ...@@ -1092,7 +1073,7 @@ static ssize_t sst_prepare_other (const char* method,
if (data_home_dir) if (data_home_dir)
{ {
if ((ret= sst_append_data_dir(env, data_home_dir))) if ((ret= sst_append_env_var(env, DATA_HOME_DIR_ENV, data_home_dir)))
{ {
WSREP_ERROR("sst_prepare_other(): appending data " WSREP_ERROR("sst_prepare_other(): appending data "
"directory failed: %d", ret); "directory failed: %d", ret);
...@@ -1278,12 +1259,12 @@ ssize_t wsrep_sst_prepare (void** msg) ...@@ -1278,12 +1259,12 @@ ssize_t wsrep_sst_prepare (void** msg)
*msg = malloc (msg_len); *msg = malloc (msg_len);
if (NULL != *msg) { if (NULL != *msg) {
char* const method_ptr(reinterpret_cast<char*>(*msg)); char* const method_ptr(static_cast<char*>(*msg));
strcpy (method_ptr, method); strcpy (method_ptr, method);
char* const addr_ptr(method_ptr + method_len + 1); char* const addr_ptr(method_ptr + method_len + 1);
strcpy (addr_ptr, addr_out); strcpy (addr_ptr, addr_out);
WSREP_INFO ("Prepared SST request: %s|%s", method_ptr, addr_ptr); WSREP_DEBUG("Prepared SST request: %s|%s", method_ptr, addr_ptr);
} }
else { else {
WSREP_ERROR("Failed to allocate SST request of size %zu. Can't continue.", WSREP_ERROR("Failed to allocate SST request of size %zu. Can't continue.",
...@@ -1736,6 +1717,7 @@ static int sst_donate_other (const char* method, ...@@ -1736,6 +1717,7 @@ static int sst_donate_other (const char* method,
"wsrep_sst_%s " "wsrep_sst_%s "
WSREP_SST_OPT_ROLE " 'donor' " WSREP_SST_OPT_ROLE " 'donor' "
WSREP_SST_OPT_ADDR " '%s' " WSREP_SST_OPT_ADDR " '%s' "
WSREP_SST_OPT_LPORT " '%u' "
WSREP_SST_OPT_SOCKET " '%s' " WSREP_SST_OPT_SOCKET " '%s' "
WSREP_SST_OPT_DATA " '%s' " WSREP_SST_OPT_DATA " '%s' "
"%s" "%s"
...@@ -1743,7 +1725,8 @@ static int sst_donate_other (const char* method, ...@@ -1743,7 +1725,8 @@ static int sst_donate_other (const char* method,
WSREP_SST_OPT_GTID_DOMAIN_ID " '%d'" WSREP_SST_OPT_GTID_DOMAIN_ID " '%d'"
"%s" "%s"
"%s", "%s",
method, addr, mysqld_unix_port, mysql_real_data_home, method, addr, mysqld_port, mysqld_unix_port,
mysql_real_data_home,
wsrep_defaults_file, wsrep_defaults_file,
uuid, (long long) seqno, wsrep_gtid_domain_id, uuid, (long long) seqno, wsrep_gtid_domain_id,
binlog_opt_val, binlog_opt_val,
...@@ -1823,7 +1806,21 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx, ...@@ -1823,7 +1806,21 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx,
const char* data = method + method_len + 1; const char* data = method + method_len + 1;
if (check_request_str(data, address_char)) /* check for auth@addr separator */
const char* addr= strrchr(data, '@');
wsp::string remote_auth;
if (addr)
{
remote_auth.set(strndup(data, addr - data));
addr++;
}
else
{
// no auth part
addr= data;
}
if (check_request_str(addr, address_char))
{ {
WSREP_ERROR("Bad SST address string. SST canceled."); WSREP_ERROR("Bad SST address string. SST canceled.");
return WSREP_CB_FAILURE; return WSREP_CB_FAILURE;
...@@ -1844,15 +1841,25 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx, ...@@ -1844,15 +1841,25 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx,
} }
int ret; int ret;
if ((ret= sst_append_auth_env(env, sst_auth_real))) if ((ret= sst_append_env_var(env, WSREP_SST_AUTH_ENV, sst_auth_real)))
{ {
WSREP_ERROR("wsrep_sst_donate_cb(): appending auth env failed: %d", ret); WSREP_ERROR("wsrep_sst_donate_cb(): appending auth env failed: %d", ret);
return WSREP_CB_FAILURE; return WSREP_CB_FAILURE;
} }
if (remote_auth())
{
if ((ret= sst_append_env_var(env, WSREP_SST_REMOTE_AUTH_ENV,remote_auth())))
{
WSREP_ERROR("wsrep_sst_donate_cb(): appending remote auth env failed: "
"%d", ret);
return WSREP_CB_FAILURE;
}
}
if (data_home_dir) if (data_home_dir)
{ {
if ((ret= sst_append_data_dir(env, data_home_dir))) if ((ret= sst_append_env_var(env, DATA_HOME_DIR_ENV, data_home_dir)))
{ {
WSREP_ERROR("wsrep_sst_donate_cb(): appending data " WSREP_ERROR("wsrep_sst_donate_cb(): appending data "
"directory failed: %d", ret); "directory failed: %d", ret);
...@@ -1862,12 +1869,12 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx, ...@@ -1862,12 +1869,12 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx,
if (!strcmp (WSREP_SST_MYSQLDUMP, method)) if (!strcmp (WSREP_SST_MYSQLDUMP, method))
{ {
ret = sst_donate_mysqldump(data, &current_gtid->uuid, uuid_str, ret = sst_donate_mysqldump(addr, &current_gtid->uuid, uuid_str,
current_gtid->seqno, bypass, env()); current_gtid->seqno, bypass, env());
} }
else else
{ {
ret = sst_donate_other(method, data, uuid_str, ret = sst_donate_other(method, addr, uuid_str,
current_gtid->seqno, bypass, env()); current_gtid->seqno, bypass, env());
} }
......
...@@ -272,8 +272,14 @@ IF(CONNECT_WITH_JDBC) ...@@ -272,8 +272,14 @@ IF(CONNECT_WITH_JDBC)
JdbcInterface.java ApacheInterface.java MariadbInterface.java JdbcInterface.java ApacheInterface.java MariadbInterface.java
MysqlInterface.java OracleInterface.java PostgresqlInterface.java MysqlInterface.java OracleInterface.java PostgresqlInterface.java
Mongo2Interface.java Mongo3Interface.java Mongo2Interface.java Mongo3Interface.java
JavaWrappers.jar) mysql-test/connect/std_data/JavaWrappers.jar)
add_definitions(-DJAVA_SUPPORT) add_definitions(-DJAVA_SUPPORT)
IF(CONNECT_WITH_MONGO)
SET(CONNECT_SOURCES ${CONNECT_SOURCES}
mysql-test/connect/std_data/Mongo2.jar
mysql-test/connect/std_data/Mongo3.jar)
add_definitions(-DMONGO_SUPPORT)
ENDIF()
ELSE() ELSE()
SET(JDBC_LIBRARY "") SET(JDBC_LIBRARY "")
ENDIF() ENDIF()
...@@ -405,8 +411,13 @@ IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND) ...@@ -405,8 +411,13 @@ IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND)
SET (JAVA_SOURCES JdbcInterface.java) SET (JAVA_SOURCES JdbcInterface.java)
add_jar(JdbcInterface ${JAVA_SOURCES}) add_jar(JdbcInterface ${JAVA_SOURCES})
INSTALL(FILES INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/JavaWrappers.jar ${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/connect/std_data/JavaWrappers.jar
${CMAKE_CURRENT_BINARY_DIR}/JdbcInterface.jar ${CMAKE_CURRENT_BINARY_DIR}/JdbcInterface.jar
DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine) DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
IF(CONNECT_WITH_MONGO)
INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/connect/std_data/Mongo2.jar
${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/connect/std_data/Mongo3.jar
DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
ENDIF()
ENDIF() ENDIF()
This diff was suppressed by a .gitattributes entry.
...@@ -508,7 +508,7 @@ PVAL JSNX::GetCalcValue(PGLOBAL g, PJAR jap, int n) ...@@ -508,7 +508,7 @@ PVAL JSNX::GetCalcValue(PGLOBAL g, PJAR jap, int n)
{ {
// For calculated arrays, a local Value must be used // For calculated arrays, a local Value must be used
int lng = 0; int lng = 0;
short type, prec = 0; short type= 0, prec= 0;
bool b = n < Nod - 1; bool b = n < Nod - 1;
PVAL valp; PVAL valp;
PJVAL vlp, vp; PJVAL vlp, vp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment