Commit 0e1437e1 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.4 into 10.5

parents 35977e81 8c73fab7
...@@ -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)
# Remove the following comment if you don't want to have striped binaries # Remove the following comment if you don't want to have striped binaries
...@@ -50,17 +62,6 @@ IF(NOT DEFINED MANUFACTURER) ...@@ -50,17 +62,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
SET(MAX_INDEXES 64 CACHE STRING "Max number of indexes") SET(MAX_INDEXES 64 CACHE STRING "Max number of indexes")
IF (${MAX_INDEXES} GREATER 128) IF (${MAX_INDEXES} GREATER 128)
......
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2019, MariaDB Corporation. # Copyright (c) 2011, 2021, MariaDB Corporation.
# #
# 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
...@@ -98,6 +98,7 @@ ELSEIF(RPM) ...@@ -98,6 +98,7 @@ 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 "")
SET(PLUGIN_AUTH_SOCKET YES CACHE STRING "") SET(PLUGIN_AUTH_SOCKET YES CACHE STRING "")
SET(WITH_EMBEDDED_SERVER ON CACHE BOOL "") SET(WITH_EMBEDDED_SERVER ON CACHE BOOL "")
# not yet, SLES 12.3 doesn't provide pcre2 # not yet, SLES 12.3 doesn't provide pcre2
...@@ -107,6 +108,7 @@ ELSEIF(DEB) ...@@ -107,6 +108,7 @@ ELSEIF(DEB)
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 "")
SET(PLUGIN_AUTH_SOCKET YES CACHE STRING "") SET(PLUGIN_AUTH_SOCKET YES CACHE STRING "")
SET(WITH_EMBEDDED_SERVER ON CACHE BOOL "") SET(WITH_EMBEDDED_SERVER ON CACHE BOOL "")
SET(WITH_PCRE system CACHE STRING "") SET(WITH_PCRE system 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
......
...@@ -429,6 +429,32 @@ XA ROLLBACK 'xid1'; ...@@ -429,6 +429,32 @@ XA ROLLBACK 'xid1';
# #
XA START 'gtrid', 'bqual', 0x80000000; XA START 'gtrid', 'bqual', 0x80000000;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '0x80000000' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '0x80000000' at line 1
#
# 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
......
...@@ -582,6 +582,24 @@ XA START 'gtrid', 'bqual', 0x80000000; ...@@ -582,6 +582,24 @@ XA START 'gtrid', 'bqual', 0x80000000;
--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
......
connection node_2;
connection node_1;
CREATE TABLE t1(id int not null primary key, b int) engine=InnoDB; CREATE TABLE t1(id int not null primary key, b int) engine=InnoDB;
INSERT INTO t1 VALUES (0,0),(1,1),(2,2),(3,3); INSERT INTO t1 VALUES (0,0),(1,1),(2,2),(3,3);
BEGIN; BEGIN;
......
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;
...@@ -3,3 +3,4 @@ connection node_1; ...@@ -3,3 +3,4 @@ connection 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]
connection node_2; connection node_2;
connection node_1; connection node_1;
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
EXPECT_4 VARIABLE_VALUE = 4
4 1
connection node_1; connection node_1;
CREATE TABLE t1 (f1 INTEGER); CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
...@@ -52,23 +52,23 @@ SELECT COUNT(*) AS EXPECT_19 FROM t1; ...@@ -52,23 +52,23 @@ SELECT COUNT(*) AS EXPECT_19 FROM t1;
EXPECT_19 EXPECT_19
19 19
connection node_2; connection node_2;
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
EXPECT_4 VARIABLE_VALUE = 4
4 1
SELECT COUNT(*) AS EXPECT_19 FROM t1; SELECT COUNT(*) AS EXPECT_19 FROM t1;
EXPECT_19 EXPECT_19
19 19
connection node_3; connection node_3;
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
EXPECT_4 VARIABLE_VALUE = 4
4 1
SELECT COUNT(*) AS EXPECT_19 FROM t1; SELECT COUNT(*) AS EXPECT_19 FROM t1;
EXPECT_19 EXPECT_19
19 19
connection node_4; connection node_4;
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
EXPECT_4 VARIABLE_VALUE = 4
4 1
SELECT COUNT(*) AS EXPECT_19 FROM t1; SELECT COUNT(*) AS EXPECT_19 FROM t1;
EXPECT_19 EXPECT_19
19 19
......
...@@ -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
...@@ -69,3 +72,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N ...@@ -69,3 +72,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
--source include/galera_wait_ready.inc --source include/galera_wait_ready.inc
# 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
......
...@@ -15,6 +15,7 @@ rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition ...@@ -15,6 +15,7 @@ rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition
rpl_row_binlog_max_cache_size : MDEV-11092 rpl_row_binlog_max_cache_size : MDEV-11092
rpl_row_index_choice : MDEV-11666 rpl_row_index_choice : MDEV-11666
rpl_semi_sync_after_sync : fails after MDEV-16172 rpl_semi_sync_after_sync : fails after MDEV-16172
rpl_semi_sync_slave_compressed_protocol : MDEV-25580 2021-05-05 Sujatha
rpl_auto_increment_update_failure : disabled for now rpl_auto_increment_update_failure : disabled for now
rpl_current_user : waits for MDEV-22374 fix rpl_current_user : waits for MDEV-22374 fix
rpl_parallel2 : waits for MDEV-23089 rpl_parallel2 : waits for MDEV-23089
...@@ -611,8 +611,12 @@ then ...@@ -611,8 +611,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
......
This diff is collapsed.
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. /* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
Copyright (c) 2010, 2020, MariaDB Copyright (c) 2010, 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
...@@ -4184,8 +4184,17 @@ bool open_tables(THD *thd, const DDL_options_st &options, ...@@ -4184,8 +4184,17 @@ bool open_tables(THD *thd, const DDL_options_st &options,
DBUG_ENTER("open_tables"); DBUG_ENTER("open_tables");
/* Data access in XA transaction is only allowed when it is active. */ /* Data access in XA transaction is only allowed when it is active. */
if (*start && thd->transaction->xid_state.check_has_uncommitted_xa()) for (TABLE_LIST *table= *start; table; table= table->next_global)
if (!table->schema_table)
{
if (thd->transaction->xid_state.check_has_uncommitted_xa())
{
thd->transaction->xid_state.er_xaer_rmfail();
DBUG_RETURN(true); DBUG_RETURN(true);
}
else
break;
}
thd->current_tablenr= 0; thd->current_tablenr= 0;
restart: restart:
......
...@@ -703,48 +703,29 @@ static void* sst_joiner_thread (void* a) ...@@ -703,48 +703,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();
} }
...@@ -1155,7 +1136,7 @@ static ssize_t sst_prepare_other (const char* method, ...@@ -1155,7 +1136,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;
...@@ -1163,7 +1144,7 @@ static ssize_t sst_prepare_other (const char* method, ...@@ -1163,7 +1144,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);
...@@ -1375,7 +1356,7 @@ std::string wsrep_sst_prepare() ...@@ -1375,7 +1356,7 @@ std::string wsrep_sst_prepare()
const char* method_ptr(ret.data()); const char* method_ptr(ret.data());
const char* addr_ptr(ret.data() + strlen(method_ptr) + 1); const char* addr_ptr(ret.data() + strlen(method_ptr) + 1);
WSREP_INFO ("Prepared SST request: %s|%s", method_ptr, addr_ptr); WSREP_DEBUG("Prepared SST request: %s|%s", method_ptr, addr_ptr);
if (addr_out != addr_in) /* malloc'ed */ free ((char*)addr_out); if (addr_out != addr_in) /* malloc'ed */ free ((char*)addr_out);
...@@ -1872,6 +1853,7 @@ static int sst_donate_other (const char* method, ...@@ -1872,6 +1853,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"
...@@ -1880,7 +1862,8 @@ static int sst_donate_other (const char* method, ...@@ -1880,7 +1862,8 @@ static int sst_donate_other (const char* method,
"%s" "%s"
"%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_oss.str().c_str(), gtid.seqno().get(), wsrep_gtid_server.domain_id, uuid_oss.str().c_str(), gtid.seqno().get(), wsrep_gtid_server.domain_id,
binlog_opt_val, binlog_index_opt_val, binlog_opt_val, binlog_index_opt_val,
...@@ -1969,7 +1952,21 @@ int wsrep_sst_donate(const std::string& msg, ...@@ -1969,7 +1952,21 @@ int wsrep_sst_donate(const std::string& msg,
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;
...@@ -1983,15 +1980,25 @@ int wsrep_sst_donate(const std::string& msg, ...@@ -1983,15 +1980,25 @@ int wsrep_sst_donate(const std::string& msg,
} }
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);
......
...@@ -268,8 +268,14 @@ IF(CONNECT_WITH_JDBC) ...@@ -268,8 +268,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()
...@@ -415,8 +421,13 @@ IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND) ...@@ -415,8 +421,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