Skip to content

Commit

Permalink
Merge branch 10.4 into 10.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sysprg committed May 6, 2024
2 parents 55754be + f378e76 commit b88c20c
Show file tree
Hide file tree
Showing 74 changed files with 4,552 additions and 435 deletions.
9 changes: 0 additions & 9 deletions configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,6 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND (NOT MSVC))
ENDIF()
ENDIF()

# workaround for old gcc on x86, gcc atomic ops only work under -march=i686
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND
CMAKE_C_COMPILER_VERSION VERSION_LESS "4.4.0")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
# query_response_time.cc causes "error: unable to find a register to spill"
SET(PLUGIN_QUERY_RESPONSE_TIME NO CACHE BOOL "Disabled, gcc is too old")
ENDIF()

# use runtime atomic-support detection in aarch64
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
MY_CHECK_AND_SET_COMPILER_FLAG("-moutline-atomics")
Expand Down
22 changes: 21 additions & 1 deletion extra/mariabackup/encryption_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,16 @@ static std::string get_encryption_plugin_from_cnf()
plugin_load = line + 12;
// remote \n at the end of string
plugin_load.resize(plugin_load.size() - 1);
break;
}

if (strncmp(line, "innodb_encrypt_tables=", 22) == 0)
{
if (!strncmp(line + 22, "ON", 2) ||
!strncmp(line + 22, "1", 1))
srv_encrypt_tables= 1;
else if (!strncmp(line + 22, "FORCE", 5) ||
!strncmp(line + 22, "2", 1))
srv_encrypt_tables= 2;
}
}
fclose(f);
Expand Down Expand Up @@ -154,6 +163,17 @@ void encryption_plugin_backup_init(MYSQL *mysql)

mysql_free_result(result);

result = xb_mysql_query(mysql, "select @@innodb_encrypt_tables", true, true);
row = mysql_fetch_row(result);
if (!row);
else if (const char *r= row[0])
{
if (!strcmp(r, "ON")) srv_encrypt_tables= 1;
else if (!strcmp(r, "FORCE")) srv_encrypt_tables= 2;
oss << "innodb_encrypt_tables=" << r << std::endl;
}

mysql_free_result(result);
encryption_plugin_config = oss.str();

argc = 0;
Expand Down
2 changes: 1 addition & 1 deletion extra/wolfssl/wolfssl
Submodule wolfssl updated 335 files
25 changes: 25 additions & 0 deletions mysql-test/main/function_defaults.result
Original file line number Diff line number Diff line change
Expand Up @@ -3145,3 +3145,28 @@ a b c
2 2010-10-10 10:10:10 x
drop table t1;
set timestamp=default;
#
# MDEV-33790: Incorrect DEFAULT expression evaluated in UPDATE
#
create table t1 (
a int,
b timestamp default '2010-10-10 10:10:10' on update now(),
c varchar(100) default 'x');
create table t2 (a int primary key);
insert t1 (a) values (1),(2);
insert t2 (a) values (1),(2);
select * from t1;
a b c
1 2010-10-10 10:10:10 x
2 2010-10-10 10:10:10 x
set timestamp=unix_timestamp('2011-11-11 11-11-11');
update t1,t2 set b=default, c=default(b) where t1.a=1 and t1.a= t2.a;
select * from t1;
a b c
1 2010-10-10 10:10:10 2010-10-10 10:10:10
2 2010-10-10 10:10:10 x
drop table t1, t2;
set timestamp=default;
#
# End of 10.4 tests
#
23 changes: 23 additions & 0 deletions mysql-test/main/function_defaults.test
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,26 @@ update t1 set b=default, c=default(b) where a=1;
select * from t1;
drop table t1;
set timestamp=default;

--echo #
--echo # MDEV-33790: Incorrect DEFAULT expression evaluated in UPDATE
--echo #

create table t1 (
a int,
b timestamp default '2010-10-10 10:10:10' on update now(),
c varchar(100) default 'x');
create table t2 (a int primary key);
insert t1 (a) values (1),(2);
insert t2 (a) values (1),(2);

select * from t1;
set timestamp=unix_timestamp('2011-11-11 11-11-11');
update t1,t2 set b=default, c=default(b) where t1.a=1 and t1.a= t2.a;
select * from t1;
drop table t1, t2;
set timestamp=default;

--echo #
--echo # End of 10.4 tests
--echo #
3 changes: 0 additions & 3 deletions mysql-test/suite/galera/disabled.def
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
galera_as_slave_ctas : MDEV-28378 timeout
galera_pc_recovery : MDEV-25199 cluster fails to start up
galera_sequences : MDEV-32561 WSREP FSM failure: no such a transition REPLICATING -> COMMITTED
versioning_trx_id : MDEV-18590 : galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
galera_concurrent_ctas : MDEV-32779 galera_concurrent_ctas: assertion in the galera::ReplicatorSMM::finish_cert()
galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
galera_sst_mysqldump_with_key : MDEV-32782 galera_sst_mysqldump_with_key test failed
galera_var_ignore_apply_errors : MENT-1997 galera_var_ignore_apply_errors test freezes
MDEV-22232 : temporarily disabled at the request of Codership
MW-402 : temporarily disabled at the request of Codership
galera_desync_overlapped : MDEV-21538 galera_desync_overlapped MTR failed: Result content mismatch
galera_create_table_as_select : MDEV-33952 fails sporadically
4 changes: 4 additions & 0 deletions mysql-test/suite/galera/galera_4nodes.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#gale
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
auto-increment-offset=1

[mysqld.2]
wsrep-on=1
Expand All @@ -32,6 +33,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#gale
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
auto-increment-offset=2

[mysqld.3]
wsrep-on=1
Expand All @@ -43,6 +45,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#gale
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
auto-increment-offset=3

[mysqld.4]
wsrep-on=1
Expand All @@ -54,6 +57,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#gale
wsrep_node_address='127.0.0.1:@mysqld.4.#galera_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
auto-increment-offset=4

[ENV]
NODE_MYPORT_1= @mysqld.1.port
Expand Down
6 changes: 2 additions & 4 deletions mysql-test/suite/galera/r/MDEV-27276.result
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_1a;
SET SESSION DEBUG_SYNC = "RESET";
connection node_2;
SELECT * FROM p;
id f2
Expand Down
126 changes: 56 additions & 70 deletions mysql-test/suite/galera/r/MW-369.result
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,20 @@ START TRANSACTION;
DELETE FROM p WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
INSERT INTO c VALUES (1, 1);
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
SET GLOBAL DEBUG_DBUG = "";
SET DEBUG_SYNC = 'RESET';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
Expand All @@ -54,22 +52,20 @@ START TRANSACTION;
UPDATE p SET f2 = 1 WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
UPDATE c SET f2 = 1 WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
SET GLOBAL DEBUG_DBUG = "";
SET DEBUG_SYNC = 'RESET';
connection node_1;
connection node_2;
SELECT * FROM p;
Expand All @@ -94,22 +90,20 @@ START TRANSACTION;
UPDATE p SET f2 = 1 WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
DELETE FROM c WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
SET GLOBAL DEBUG_DBUG = "";
SET DEBUG_SYNC = 'RESET';
connection node_1;
connection node_2;
SELECT * FROM p;
Expand All @@ -130,22 +124,20 @@ START TRANSACTION;
UPDATE p SET f2 = 1 WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
INSERT INTO c VALUES (1, 0);;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
SET GLOBAL DEBUG_DBUG = "";
SET DEBUG_SYNC = 'RESET';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
Expand All @@ -170,22 +162,20 @@ START TRANSACTION;
DELETE FROM p WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
UPDATE c SET f2 = 1 WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
SET GLOBAL DEBUG_DBUG = "";
SET DEBUG_SYNC = 'RESET';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
Expand Down Expand Up @@ -215,22 +205,20 @@ START TRANSACTION;
INSERT INTO cf (f1, p_id) VALUES (10, 1);
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
INSERT INTO cf (f1, p_id) VALUES (20, 1);
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
SET GLOBAL DEBUG_DBUG = "";
SET DEBUG_SYNC = 'RESET';
connection node_1;
connection node_2;
SELECT * FROM pf;
Expand All @@ -255,22 +243,20 @@ START TRANSACTION;
UPDATE pg SET f2 = 1 WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
INSERT INTO cg VALUES (1, 1, 0);
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
SET GLOBAL DEBUG_DBUG = "";
SET DEBUG_SYNC = 'RESET';
connection node_1;
connection node_2;
SELECT * FROM pg;
Expand Down

0 comments on commit b88c20c

Please sign in to comment.