Skip to content

Commit b88c20c

Browse files
committed
Merge branch 10.4 into 10.5
2 parents 55754be + f378e76 commit b88c20c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+4552
-435
lines changed

configure.cmake

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,6 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND (NOT MSVC))
6060
ENDIF()
6161
ENDIF()
6262

63-
# workaround for old gcc on x86, gcc atomic ops only work under -march=i686
64-
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND
65-
CMAKE_C_COMPILER_VERSION VERSION_LESS "4.4.0")
66-
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
67-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
68-
# query_response_time.cc causes "error: unable to find a register to spill"
69-
SET(PLUGIN_QUERY_RESPONSE_TIME NO CACHE BOOL "Disabled, gcc is too old")
70-
ENDIF()
71-
7263
# use runtime atomic-support detection in aarch64
7364
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
7465
MY_CHECK_AND_SET_COMPILER_FLAG("-moutline-atomics")

extra/mariabackup/encryption_plugin.cc

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,16 @@ static std::string get_encryption_plugin_from_cnf()
7171
plugin_load = line + 12;
7272
// remote \n at the end of string
7373
plugin_load.resize(plugin_load.size() - 1);
74-
break;
74+
}
75+
76+
if (strncmp(line, "innodb_encrypt_tables=", 22) == 0)
77+
{
78+
if (!strncmp(line + 22, "ON", 2) ||
79+
!strncmp(line + 22, "1", 1))
80+
srv_encrypt_tables= 1;
81+
else if (!strncmp(line + 22, "FORCE", 5) ||
82+
!strncmp(line + 22, "2", 1))
83+
srv_encrypt_tables= 2;
7584
}
7685
}
7786
fclose(f);
@@ -154,6 +163,17 @@ void encryption_plugin_backup_init(MYSQL *mysql)
154163

155164
mysql_free_result(result);
156165

166+
result = xb_mysql_query(mysql, "select @@innodb_encrypt_tables", true, true);
167+
row = mysql_fetch_row(result);
168+
if (!row);
169+
else if (const char *r= row[0])
170+
{
171+
if (!strcmp(r, "ON")) srv_encrypt_tables= 1;
172+
else if (!strcmp(r, "FORCE")) srv_encrypt_tables= 2;
173+
oss << "innodb_encrypt_tables=" << r << std::endl;
174+
}
175+
176+
mysql_free_result(result);
157177
encryption_plugin_config = oss.str();
158178

159179
argc = 0;

extra/wolfssl/wolfssl

Submodule wolfssl updated 335 files

mysql-test/main/function_defaults.result

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3145,3 +3145,28 @@ a b c
31453145
2 2010-10-10 10:10:10 x
31463146
drop table t1;
31473147
set timestamp=default;
3148+
#
3149+
# MDEV-33790: Incorrect DEFAULT expression evaluated in UPDATE
3150+
#
3151+
create table t1 (
3152+
a int,
3153+
b timestamp default '2010-10-10 10:10:10' on update now(),
3154+
c varchar(100) default 'x');
3155+
create table t2 (a int primary key);
3156+
insert t1 (a) values (1),(2);
3157+
insert t2 (a) values (1),(2);
3158+
select * from t1;
3159+
a b c
3160+
1 2010-10-10 10:10:10 x
3161+
2 2010-10-10 10:10:10 x
3162+
set timestamp=unix_timestamp('2011-11-11 11-11-11');
3163+
update t1,t2 set b=default, c=default(b) where t1.a=1 and t1.a= t2.a;
3164+
select * from t1;
3165+
a b c
3166+
1 2010-10-10 10:10:10 2010-10-10 10:10:10
3167+
2 2010-10-10 10:10:10 x
3168+
drop table t1, t2;
3169+
set timestamp=default;
3170+
#
3171+
# End of 10.4 tests
3172+
#

mysql-test/main/function_defaults.test

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,26 @@ update t1 set b=default, c=default(b) where a=1;
6767
select * from t1;
6868
drop table t1;
6969
set timestamp=default;
70+
71+
--echo #
72+
--echo # MDEV-33790: Incorrect DEFAULT expression evaluated in UPDATE
73+
--echo #
74+
75+
create table t1 (
76+
a int,
77+
b timestamp default '2010-10-10 10:10:10' on update now(),
78+
c varchar(100) default 'x');
79+
create table t2 (a int primary key);
80+
insert t1 (a) values (1),(2);
81+
insert t2 (a) values (1),(2);
82+
83+
select * from t1;
84+
set timestamp=unix_timestamp('2011-11-11 11-11-11');
85+
update t1,t2 set b=default, c=default(b) where t1.a=1 and t1.a= t2.a;
86+
select * from t1;
87+
drop table t1, t2;
88+
set timestamp=default;
89+
90+
--echo #
91+
--echo # End of 10.4 tests
92+
--echo #

mysql-test/suite/galera/disabled.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@
1313
galera_as_slave_ctas : MDEV-28378 timeout
1414
galera_pc_recovery : MDEV-25199 cluster fails to start up
1515
galera_sequences : MDEV-32561 WSREP FSM failure: no such a transition REPLICATING -> COMMITTED
16-
versioning_trx_id : MDEV-18590 : galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
1716
galera_concurrent_ctas : MDEV-32779 galera_concurrent_ctas: assertion in the galera::ReplicatorSMM::finish_cert()
1817
galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
1918
galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
2019
galera_sst_mysqldump_with_key : MDEV-32782 galera_sst_mysqldump_with_key test failed
2120
galera_var_ignore_apply_errors : MENT-1997 galera_var_ignore_apply_errors test freezes
22-
MDEV-22232 : temporarily disabled at the request of Codership
23-
MW-402 : temporarily disabled at the request of Codership
2421
galera_desync_overlapped : MDEV-21538 galera_desync_overlapped MTR failed: Result content mismatch
2522
galera_create_table_as_select : MDEV-33952 fails sporadically

mysql-test/suite/galera/galera_4nodes.cnf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#gale
2121
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
2222
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
2323
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
24+
auto-increment-offset=1
2425

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

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

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

5862
[ENV]
5963
NODE_MYPORT_1= @mysqld.1.port

mysql-test/suite/galera/r/MDEV-27276.result

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@ connection node_1a;
1616
SET SESSION wsrep_on = 0;
1717
SET SESSION wsrep_on = 1;
1818
SET GLOBAL wsrep_provider_options = 'dbug=';
19-
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
2019
connection node_1;
2120
COMMIT;
2221
connection node_1a;
23-
SET SESSION wsrep_on = 0;
24-
SET SESSION wsrep_on = 1;
2522
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
26-
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
2723
SET GLOBAL wsrep_provider_options = 'dbug=';
2824
connection node_1;
2925
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
26+
connection node_1a;
27+
SET SESSION DEBUG_SYNC = "RESET";
3028
connection node_2;
3129
SELECT * FROM p;
3230
id f2

mysql-test/suite/galera/r/MW-369.result

Lines changed: 56 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,20 @@ START TRANSACTION;
1212
DELETE FROM p WHERE f1 = 1;
1313
connection node_1a;
1414
SET SESSION wsrep_sync_wait = 0;
15-
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
15+
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
1616
connection node_2;
1717
INSERT INTO c VALUES (1, 1);
1818
connection node_1a;
19-
SET SESSION wsrep_on = 0;
20-
SET SESSION wsrep_on = 1;
21-
SET GLOBAL wsrep_provider_options = 'dbug=';
22-
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
19+
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
2320
connection node_1;
21+
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
2422
COMMIT;
2523
connection node_1a;
26-
SET SESSION wsrep_on = 0;
27-
SET SESSION wsrep_on = 1;
28-
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
29-
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
30-
SET GLOBAL wsrep_provider_options = 'dbug=';
24+
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
25+
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
26+
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
27+
SET GLOBAL DEBUG_DBUG = "";
28+
SET DEBUG_SYNC = 'RESET';
3129
connection node_1;
3230
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
3331
connection node_2;
@@ -54,22 +52,20 @@ START TRANSACTION;
5452
UPDATE p SET f2 = 1 WHERE f1 = 1;
5553
connection node_1a;
5654
SET SESSION wsrep_sync_wait = 0;
57-
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
55+
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
5856
connection node_2;
5957
UPDATE c SET f2 = 1 WHERE f1 = 1;
6058
connection node_1a;
61-
SET SESSION wsrep_on = 0;
62-
SET SESSION wsrep_on = 1;
63-
SET GLOBAL wsrep_provider_options = 'dbug=';
64-
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
59+
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
6560
connection node_1;
61+
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
6662
COMMIT;
6763
connection node_1a;
68-
SET SESSION wsrep_on = 0;
69-
SET SESSION wsrep_on = 1;
70-
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
71-
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
72-
SET GLOBAL wsrep_provider_options = 'dbug=';
64+
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
65+
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
66+
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
67+
SET GLOBAL DEBUG_DBUG = "";
68+
SET DEBUG_SYNC = 'RESET';
7369
connection node_1;
7470
connection node_2;
7571
SELECT * FROM p;
@@ -94,22 +90,20 @@ START TRANSACTION;
9490
UPDATE p SET f2 = 1 WHERE f1 = 1;
9591
connection node_1a;
9692
SET SESSION wsrep_sync_wait = 0;
97-
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
93+
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
9894
connection node_2;
9995
DELETE FROM c WHERE f1 = 1;
10096
connection node_1a;
101-
SET SESSION wsrep_on = 0;
102-
SET SESSION wsrep_on = 1;
103-
SET GLOBAL wsrep_provider_options = 'dbug=';
104-
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
97+
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
10598
connection node_1;
99+
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
106100
COMMIT;
107101
connection node_1a;
108-
SET SESSION wsrep_on = 0;
109-
SET SESSION wsrep_on = 1;
110-
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
111-
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
112-
SET GLOBAL wsrep_provider_options = 'dbug=';
102+
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
103+
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
104+
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
105+
SET GLOBAL DEBUG_DBUG = "";
106+
SET DEBUG_SYNC = 'RESET';
113107
connection node_1;
114108
connection node_2;
115109
SELECT * FROM p;
@@ -130,22 +124,20 @@ START TRANSACTION;
130124
UPDATE p SET f2 = 1 WHERE f1 = 1;
131125
connection node_1a;
132126
SET SESSION wsrep_sync_wait = 0;
133-
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
127+
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
134128
connection node_2;
135129
INSERT INTO c VALUES (1, 0);;
136130
connection node_1a;
137-
SET SESSION wsrep_on = 0;
138-
SET SESSION wsrep_on = 1;
139-
SET GLOBAL wsrep_provider_options = 'dbug=';
140-
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
131+
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
141132
connection node_1;
133+
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
142134
COMMIT;
143135
connection node_1a;
144-
SET SESSION wsrep_on = 0;
145-
SET SESSION wsrep_on = 1;
146-
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
147-
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
148-
SET GLOBAL wsrep_provider_options = 'dbug=';
136+
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
137+
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
138+
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
139+
SET GLOBAL DEBUG_DBUG = "";
140+
SET DEBUG_SYNC = 'RESET';
149141
connection node_1;
150142
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
151143
connection node_2;
@@ -170,22 +162,20 @@ START TRANSACTION;
170162
DELETE FROM p WHERE f1 = 1;
171163
connection node_1a;
172164
SET SESSION wsrep_sync_wait = 0;
173-
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
165+
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
174166
connection node_2;
175167
UPDATE c SET f2 = 1 WHERE f1 = 1;
176168
connection node_1a;
177-
SET SESSION wsrep_on = 0;
178-
SET SESSION wsrep_on = 1;
179-
SET GLOBAL wsrep_provider_options = 'dbug=';
180-
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
169+
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
181170
connection node_1;
171+
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
182172
COMMIT;
183173
connection node_1a;
184-
SET SESSION wsrep_on = 0;
185-
SET SESSION wsrep_on = 1;
186-
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
187-
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
188-
SET GLOBAL wsrep_provider_options = 'dbug=';
174+
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
175+
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
176+
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
177+
SET GLOBAL DEBUG_DBUG = "";
178+
SET DEBUG_SYNC = 'RESET';
189179
connection node_1;
190180
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
191181
connection node_2;
@@ -215,22 +205,20 @@ START TRANSACTION;
215205
INSERT INTO cf (f1, p_id) VALUES (10, 1);
216206
connection node_1a;
217207
SET SESSION wsrep_sync_wait = 0;
218-
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
208+
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
219209
connection node_2;
220210
INSERT INTO cf (f1, p_id) VALUES (20, 1);
221211
connection node_1a;
222-
SET SESSION wsrep_on = 0;
223-
SET SESSION wsrep_on = 1;
224-
SET GLOBAL wsrep_provider_options = 'dbug=';
225-
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
212+
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
226213
connection node_1;
214+
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
227215
COMMIT;
228216
connection node_1a;
229-
SET SESSION wsrep_on = 0;
230-
SET SESSION wsrep_on = 1;
231-
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
232-
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
233-
SET GLOBAL wsrep_provider_options = 'dbug=';
217+
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
218+
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
219+
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
220+
SET GLOBAL DEBUG_DBUG = "";
221+
SET DEBUG_SYNC = 'RESET';
234222
connection node_1;
235223
connection node_2;
236224
SELECT * FROM pf;
@@ -255,22 +243,20 @@ START TRANSACTION;
255243
UPDATE pg SET f2 = 1 WHERE f1 = 1;
256244
connection node_1a;
257245
SET SESSION wsrep_sync_wait = 0;
258-
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
246+
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
259247
connection node_2;
260248
INSERT INTO cg VALUES (1, 1, 0);
261249
connection node_1a;
262-
SET SESSION wsrep_on = 0;
263-
SET SESSION wsrep_on = 1;
264-
SET GLOBAL wsrep_provider_options = 'dbug=';
265-
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
250+
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
266251
connection node_1;
252+
SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
267253
COMMIT;
268254
connection node_1a;
269-
SET SESSION wsrep_on = 0;
270-
SET SESSION wsrep_on = 1;
271-
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
272-
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
273-
SET GLOBAL wsrep_provider_options = 'dbug=';
255+
SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
256+
SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
257+
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
258+
SET GLOBAL DEBUG_DBUG = "";
259+
SET DEBUG_SYNC = 'RESET';
274260
connection node_1;
275261
connection node_2;
276262
SELECT * FROM pg;

0 commit comments

Comments
 (0)