Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6a470db5
Commit
6a470db5
authored
Sep 14, 2023
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.5 into 10.6
parents
0f9acce3
81e60f1a
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
383 additions
and
92 deletions
+383
-92
mysql-test/include/linux.inc
mysql-test/include/linux.inc
+1
-1
mysql-test/main/no-threads.opt
mysql-test/main/no-threads.opt
+0
-0
mysql-test/main/no-threads.test
mysql-test/main/no-threads.test
+0
-1
mysql-test/main/ssl_cipher.result
mysql-test/main/ssl_cipher.result
+2
-0
mysql-test/main/ssl_cipher.test
mysql-test/main/ssl_cipher.test
+6
-0
mysql-test/main/tls_version.result
mysql-test/main/tls_version.result
+2
-0
mysql-test/main/tls_version.test
mysql-test/main/tls_version.test
+5
-0
mysql-test/main/tls_version1.result
mysql-test/main/tls_version1.result
+2
-0
mysql-test/main/tls_version1.test
mysql-test/main/tls_version1.test
+5
-0
mysql-test/suite/galera/disabled.def
mysql-test/suite/galera/disabled.def
+0
-3
mysql-test/suite/galera/r/galera_partition.result
mysql-test/suite/galera/r/galera_partition.result
+7
-18
mysql-test/suite/galera/t/galera_partition.cnf
mysql-test/suite/galera/t/galera_partition.cnf
+0
-22
mysql-test/suite/galera/t/galera_partition.test
mysql-test/suite/galera/t/galera_partition.test
+14
-29
mysql-test/suite/galera_sr/r/MDEV-32051.result
mysql-test/suite/galera_sr/r/MDEV-32051.result
+38
-0
mysql-test/suite/galera_sr/t/MDEV-32051.test
mysql-test/suite/galera_sr/t/MDEV-32051.test
+72
-0
mysql-test/suite/innodb/r/scrub.result
mysql-test/suite/innodb/r/scrub.result
+13
-0
mysql-test/suite/innodb/t/scrub.test
mysql-test/suite/innodb/t/scrub.test
+19
-0
mysql-test/suite/plugins/t/show_all_plugins.test
mysql-test/suite/plugins/t/show_all_plugins.test
+1
-1
mysql-test/suite/rpl/r/rpl_sql_thd_start_errno_cleared.result
...l-test/suite/rpl/r/rpl_sql_thd_start_errno_cleared.result
+48
-0
mysql-test/suite/rpl/t/rpl_sql_thd_start_errno_cleared.test
mysql-test/suite/rpl/t/rpl_sql_thd_start_errno_cleared.test
+93
-0
sql/mysqld.cc
sql/mysqld.cc
+2
-0
sql/slave.cc
sql/slave.cc
+23
-11
sql/sys_vars.cc
sql/sys_vars.cc
+1
-1
sql/wsrep_notify.cc
sql/wsrep_notify.cc
+7
-0
sql/wsrep_utils.h
sql/wsrep_utils.h
+5
-1
storage/innobase/fsp/fsp0fsp.cc
storage/innobase/fsp/fsp0fsp.cc
+15
-2
win/packaging/heidisql.wxi.in
win/packaging/heidisql.wxi.in
+1
-1
wsrep-lib
wsrep-lib
+1
-1
No files found.
mysql-test/include/linux.inc
View file @
6a470db5
if
(
`select
convert(@@version_compile_os using latin1) LIKE 'Linux' = 0
`
)
if
(
`select
@@version_compile_os not LIKE 'Linux%'
`
)
{
skip
Need
Linux
;
}
...
...
mysql-test/main/no-threads
-master
.opt
→
mysql-test/main/no-threads.opt
View file @
6a470db5
File moved
mysql-test/main/no-threads.test
View file @
6a470db5
...
...
@@ -2,7 +2,6 @@
# an additional util connection and other statistics data
--
source
include
/
no_view_protocol
.
inc
--
source
include
/
one_thread_per_connection
.
inc
#
# Test the --thread-handler=no-threads option
#
...
...
mysql-test/main/ssl_cipher.result
View file @
6a470db5
...
...
@@ -66,3 +66,5 @@ VARIABLE_VALUE like '%AES128-SHA%'
1
disconnect ssl_con;
connection default;
call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure");
FOUND 2 /TLSv1.0 and TLSv1.1 are insecure/ in mysqld.1.err
mysql-test/main/ssl_cipher.test
View file @
6a470db5
...
...
@@ -101,3 +101,9 @@ SHOW STATUS LIKE 'Ssl_cipher';
SELECT
VARIABLE_VALUE
like
'%AES128-SHA%'
FROM
INFORMATION_SCHEMA
.
SESSION_STATUS
WHERE
VARIABLE_NAME
=
'Ssl_cipher_list'
;
disconnect
ssl_con
;
connection
default
;
# MDEV-31369 Disable TLS v1.0 and 1.1 for MariaDB
call
mtr
.
add_suppression
(
"TLSv1.0 and TLSv1.1 are insecure"
);
--
let
SEARCH_FILE
=
$MYSQLTEST_VARDIR
/
log
/
mysqld
.
1.
err
--
let
SEARCH_PATTERN
=
TLSv1
.
0
and
TLSv1
.
1
are
insecure
--
source
include
/
search_pattern_in_file
.
inc
mysql-test/main/tls_version.result
View file @
6a470db5
...
...
@@ -12,3 +12,5 @@ Variable_name Value
Ssl_version TLSv1.2
@@tls_version
TLSv1.1,TLSv1.2
call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure");
FOUND 1 /TLSv1.0 and TLSv1.1 are insecure/ in mysqld.1.err
mysql-test/main/tls_version.test
View file @
6a470db5
...
...
@@ -22,3 +22,8 @@
# finally list available protocols
--
exec
$MYSQL
--
host
=
localhost
--
ssl
-
e
"select @@tls_version;"
call
mtr
.
add_suppression
(
"TLSv1.0 and TLSv1.1 are insecure"
);
--
let
SEARCH_FILE
=
$MYSQLTEST_VARDIR
/
log
/
mysqld
.
1.
err
--
let
SEARCH_PATTERN
=
TLSv1
.
0
and
TLSv1
.
1
are
insecure
--
source
include
/
search_pattern_in_file
.
inc
mysql-test/main/tls_version1.result
View file @
6a470db5
...
...
@@ -4,3 +4,5 @@ Variable_name Value
Ssl_version TLSv1
@@tls_version
TLSv1.0
call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure");
FOUND 1 /TLSv1.0 and TLSv1.1 are insecure/ in mysqld.1.err
mysql-test/main/tls_version1.test
View file @
6a470db5
...
...
@@ -10,3 +10,8 @@
--
exec
$MYSQL
--
host
=
localhost
--
ssl
--
tls_version
=
TLSv1
.
0
-
e
"show status like 'ssl_version';"
--
exec
$MYSQL
--
host
=
localhost
--
ssl
-
e
"select @@tls_version;"
call
mtr
.
add_suppression
(
"TLSv1.0 and TLSv1.1 are insecure"
);
--
let
SEARCH_FILE
=
$MYSQLTEST_VARDIR
/
log
/
mysqld
.
1.
err
--
let
SEARCH_PATTERN
=
TLSv1
.
0
and
TLSv1
.
1
are
insecure
--
source
include
/
search_pattern_in_file
.
inc
mysql-test/suite/galera/disabled.def
View file @
6a470db5
...
...
@@ -13,9 +13,6 @@
galera_as_slave_ctas : MDEV-28378 timeout
galera_pc_recovery : MDEV-25199 cluster fails to start up
galera_sst_encrypted : MDEV-29876 Galera test failure on galera_sst_encrypted
galera_binlog_checksum : MDEV-29861 Galera test case hangs
galera_var_notify_ssl_ipv6 : MDEV-29861 Galera test case hangs
galera_var_notify_cmd: MDEV-29861 Galera test case hangs
galera_var_node_address : MDEV-20485 Galera test failure
MDEV-26575 : MDEV-29878 Galera test failure on MDEV-26575
galera_bf_abort_shutdown : MDEV-29918 Assertion failure on galera_bf_abort_shutdown
...
...
mysql-test/suite/galera/r/galera_partition.result
View file @
6a470db5
...
...
@@ -3,8 +3,6 @@ connection node_1;
connection node_1;
call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*");
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
connection node_1;
CREATE TABLE t1(
id bigint unsigned NOT NULL AUTO_INCREMENT,
...
...
@@ -396,33 +394,24 @@ insert into t1 (id, dt) values (350, '2010-12-17 00:00:00');
SELECT COUNT(*) FROM t1;
COUNT(*)
350
connection node_2;
call mtr.add_suppression("WSREP: Sending JOIN failed:");
call p1(10);
connection node_3;
call mtr.add_suppression("WSREP: Sending JOIN failed:");
call p1(10);
connection node_4;
call mtr.add_suppression("WSREP: Sending JOIN failed:");
call p1(10);
connection node_1;
call p1(10);;
connection node_2;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
SET SESSION wsrep_OSU_method='RSU';
SELECT @@wsrep_OSU_method;
@@wsrep_OSU_method
RSU
SET SESSION sql_log_bin = 0;
ALTER TABLE t1 DROP PARTITION rx2009xx;
ALTER TABLE t1 DROP PARTITION rx201004;
ALTER TABLE t1 DROP PARTITION rx201008;
SET SESSION wsrep_OSU_METHOD='TOI';
SET SESSION sql_log_bin = 1;
SELECT @@wsrep_OSU_method;
@@wsrep_OSU_method
TOI
connection node_2;
connection node_3
;
connection node_
4
;
disconnect node_2a
;
connection node_
1
;
connection node_1;
DROP TABLE t1;
DROP PROCEDURE p1;
disconnect node_3;
disconnect node_4;
mysql-test/suite/galera/t/galera_partition.cnf
deleted
100644 → 0
View file @
0f9acce3
!include ../galera_4nodes.cnf
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;gmcast.segment=1'
wsrep_slave_threads=10
wsrep_debug=1
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;gmcast.segment=1'
wsrep_slave_threads=10
wsrep_debug=1
[mysqld.3]
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M;gmcast.segment=2'
wsrep_slave_threads=10
wsrep_debug=1
[mysqld.4]
wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M;gmcast.segment=3'
wsrep_slave_threads=10
wsrep_debug=1
mysql-test/suite/galera/t/galera_partition.test
View file @
6a470db5
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_partition
.
inc
--
source
include
/
big_test
.
inc
--
source
include
/
force_restart
.
inc
--
connection
node_1
call
mtr
.
add_suppression
(
"WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*"
);
call
mtr
.
add_suppression
(
"WSREP: ALTER TABLE isolation failure"
);
--
connect
node_3
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_3
--
connect
node_4
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_4
--
connection
node_1
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
4
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
CREATE
TABLE
t1
(
...
...
@@ -408,50 +406,37 @@ insert into t1 (id, dt) values (350, '2010-12-17 00:00:00');
SELECT
COUNT
(
*
)
FROM
t1
;
--
connection
node_2
call
mtr
.
add_suppression
(
"WSREP: Sending JOIN failed:"
);
send
call
p1
(
10
);
--
connection
node_3
call
mtr
.
add_suppression
(
"WSREP: Sending JOIN failed:"
);
send
call
p1
(
10
);
--
connection
node_1
--
send
call
p1
(
10
);
--
connection
node_4
call
mtr
.
add_suppression
(
"WSREP: Sending JOIN failed:"
);
send
call
p1
(
10
);
--
connection
node_2
--
connection
node_1
--
connect
node_2a
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_2
--
connection
node_2a
SET
SESSION
wsrep_OSU_method
=
'RSU'
;
SELECT
@@
wsrep_OSU_method
;
SET
SESSION
sql_log_bin
=
0
;
--
error
0
,
ER_LOCK_DEADLOCK
--
error
0
,
ER_LOCK_DEADLOCK
,
ER_LOCK_WAIT_TIMEOUT
ALTER
TABLE
t1
DROP
PARTITION
rx2009xx
;
--
error
0
,
ER_LOCK_DEADLOCK
--
error
0
,
ER_LOCK_DEADLOCK
,
ER_LOCK_WAIT_TIMEOUT
ALTER
TABLE
t1
DROP
PARTITION
rx201004
;
--
error
0
,
ER_LOCK_DEADLOCK
--
error
0
,
ER_LOCK_DEADLOCK
,
ER_LOCK_WAIT_TIMEOUT
ALTER
TABLE
t1
DROP
PARTITION
rx201008
;
SET
SESSION
wsrep_OSU_METHOD
=
'TOI'
;
SET
SESSION
sql_log_bin
=
1
;
SELECT
@@
wsrep_OSU_method
;
--
connection
node_2
--
error
0
,
ER_LOCK_DEADLOCK
reap
;
--
disconnect
node_2a
--
connection
node_3
--
error
0
,
ER_LOCK_DEADLOCK
reap
;
--
connection
node_4
--
error
0
,
ER_LOCK_DEADLOCK
--
connection
node_1
--
error
0
,
ER_LOCK_DEADLOCK
,
ER_LOCK_WAIT_TIMEOUT
reap
;
--
connection
node_1
DROP
TABLE
t1
;
DROP
PROCEDURE
p1
;
--
disconnect
node_3
--
disconnect
node_4
mysql-test/suite/galera_sr/r/MDEV-32051.result
0 → 100644
View file @
6a470db5
connection node_2;
connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
connection node_1;
SET SESSION wsrep_trx_fragment_size=1;
SET DEBUG_SYNC='wsrep_before_certification SIGNAL before_fragment WAIT_FOR continue';
INSERT INTO t1 VALUES (2);
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a;
SET SESSION wsrep_sync_wait=0;
SET DEBUG_SYNC='now WAIT_FOR before_fragment';
SET GLOBAL wsrep_provider_options = 'dbug=d,before_replicate_sync';
SET DEBUG_SYNC='now SIGNAL continue';
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET DEBUG_SYNC='RESET';
connection node_2;
TRUNCATE TABLE t1;
connection node_1a;
SET GLOBAL wsrep_provider_options = 'signal=before_replicate_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
SELECT * FROM t1;
f1
2
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
0
connection node_2;
SELECT * FROM t1;
f1
2
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
0
DROP TABLE t1;
mysql-test/suite/galera_sr/t/MDEV-32051.test
0 → 100644
View file @
6a470db5
#
# MDEV-32051 : Failed to insert streaming client
#
# Test outline:
# To reproduce we need a autocommit INSERT with streaming enabled,
# and a conflicting TRUNCATE.
# The INSERT is BF aborted by TRUNCATE during replication of the commit
# fragment, so that the INSERT must be rolled back replayed. During
# replay it fails certification, finally the statement is retried and
# succeeds. If bug is present, the streaming client for the INSERT does
# not get deleted after replay, causing the warning (or assert in debug builds)
# when retrying attempts to create the same streaming client with the same id.
#
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_debug_sync
.
inc
--
source
include
/
galera_have_debug_sync
.
inc
--
connection
node_1
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
1
);
#
# Issue an INSERT and block it right before certification
# of the commit fragment. This is needed to setup for
# before_replicate_sync in galera, to make sure we catch
# the commit fragment.
#
--
connection
node_1
SET
SESSION
wsrep_trx_fragment_size
=
1
;
SET
DEBUG_SYNC
=
'wsrep_before_certification SIGNAL before_fragment WAIT_FOR continue'
;
--
send
INSERT
INTO
t1
VALUES
(
2
)
--
connect
node_1a
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_1
--
connection
node_1a
SET
SESSION
wsrep_sync_wait
=
0
;
SET
DEBUG_SYNC
=
'now WAIT_FOR before_fragment'
;
--
let
galera_sync_point
=
before_replicate_sync
--
source
include
/
galera_set_sync_point
.
inc
SET
DEBUG_SYNC
=
'now SIGNAL continue'
;
--
source
include
/
galera_wait_sync_point
.
inc
SET
DEBUG_SYNC
=
'RESET'
;
#
# Commit fragment of INSERT is now parked in galera side
# before replication. Issue the conflicting DDL
#
--
connection
node_2
TRUNCATE
TABLE
t1
;
--
connection
node_1a
--
source
include
/
galera_signal_sync_point
.
inc
--
source
include
/
galera_clear_sync_point
.
inc
# INSERT is first aborted, but ultimately succeeds because of wsrep_autocommit_retry
# If bug is present:
# [Warning] WSREP: Failed to insert streaming client
# server_state.cpp:1152: void wsrep::server_state::start_streaming_client(wsrep::client_state*): Assertion `0' failed.
--
connection
node_1
--
reap
SELECT
*
FROM
t1
;
SELECT
COUNT
(
*
)
FROM
mysql
.
wsrep_streaming_log
;
--
connection
node_2
SELECT
*
FROM
t1
;
SELECT
COUNT
(
*
)
FROM
mysql
.
wsrep_streaming_log
;
DROP
TABLE
t1
;
mysql-test/suite/innodb/r/scrub.result
0 → 100644
View file @
6a470db5
SET GLOBAL
innodb_file_per_table=OFF,
innodb_purge_rseg_truncate_frequency=1,
innodb_immediate_scrub_data_uncompressed=ON;
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
f3 INT NOT NULL, INDEX(f1),
INDEX(f2), INDEX(f3))ENGINE=InnoDB;
INSERT INTO t1 SELECT seq, seq, seq FROM seq_1_to_16384;
INSERT INTO t1 SELECT seq, seq, seq FROM seq_1_to_16384;
INSERT INTO t1 SELECT seq, seq, seq FROM seq_1_to_16384;
DROP TABLE t1;
SET GLOBAL innodb_max_purge_lag_wait=0;
# restart
mysql-test/suite/innodb/t/scrub.test
0 → 100644
View file @
6a470db5
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_sequence
.
inc
--
source
include
/
not_embedded
.
inc
SET
GLOBAL
innodb_file_per_table
=
OFF
,
innodb_purge_rseg_truncate_frequency
=
1
,
innodb_immediate_scrub_data_uncompressed
=
ON
;
CREATE
TABLE
t1
(
f1
INT
NOT
NULL
,
f2
INT
NOT
NULL
,
f3
INT
NOT
NULL
,
INDEX
(
f1
),
INDEX
(
f2
),
INDEX
(
f3
))
ENGINE
=
InnoDB
;
INSERT
INTO
t1
SELECT
seq
,
seq
,
seq
FROM
seq_1_to_16384
;
INSERT
INTO
t1
SELECT
seq
,
seq
,
seq
FROM
seq_1_to_16384
;
INSERT
INTO
t1
SELECT
seq
,
seq
,
seq
FROM
seq_1_to_16384
;
DROP
TABLE
t1
;
SET
GLOBAL
innodb_max_purge_lag_wait
=
0
;
# The crash recovery would occasionally fail.
let
$shutdown_timeout
=
0
;
--
source
include
/
restart_mysqld
.
inc
mysql-test/suite/plugins/t/show_all_plugins.test
View file @
6a470db5
--
source
include
/
have_udf
.
inc
if
(
!
$DIALOG_EXAMPLES_SO
)
{
skip
requires
dialog_examples
.
so
;
}
if
(
!
$HA_EXAMPLE_SO
)
{
skip
requires
ha_examples
.
so
;
}
if
(
!
$LIBDAEMON_EXAMPLE_SO
)
{
skip
requires
libdaemon_examples
.
so
;
}
if
(
!
$UDF_EXAMPLE_SO
)
{
skip
requires
udf_example
.
so
;
}
if
(
!
$EXAMPLE_KEY_MANAGEMENT_SO
)
{
skip
requires
example_key_management
.
so
;
}
if
(
`SELECT VERSION() LIKE '%embedded%'`
)
{
skip
Disabled
for
embedded
until
MDEV
-
8664
is
resolved
;
}
...
...
mysql-test/suite/rpl/r/rpl_sql_thd_start_errno_cleared.result
0 → 100644
View file @
6a470db5
include/master-slave.inc
[connection master]
connection master;
create table t1 (a int primary key, b int) engine=innodb;
insert t1 values (1,1);
include/save_master_gtid.inc
connection slave;
include/sync_with_master_gtid.inc
include/stop_slave.inc
set @save_innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout;
set @save_slave_trans_retries= @@global.slave_transaction_retries;
set @@global.innodb_lock_wait_timeout= 1;
set @@global.slave_transaction_retries= 0;
connection master;
update t1 set b=b+10 where a=1;
include/save_master_gtid.inc
connection slave1;
BEGIN;
SELECT * FROM t1 WHERE a=1 FOR UPDATE;
a b
1 1
connection slave;
include/start_slave.inc
include/wait_for_slave_sql_error.inc [errno=1205]
connection slave1;
ROLLBACK;
connection slave;
set @save_dbug = @@global.debug_dbug;
set @@global.debug_dbug= "+d,delay_sql_thread_after_release_run_lock";
include/start_slave.inc
set debug_sync= "now wait_for sql_thread_run_lock_released";
# Validating that the SQL thread is running..
# ..success
# Validating that Last_SQL_Errno is cleared..
# ..success
set debug_sync= "now signal sql_thread_continue";
set @@global.debug_dbug= @saved_dbug;
set debug_sync= "RESET";
# Cleanup
connection master;
drop table t1;
connection slave;
include/stop_slave.inc
set @@global.innodb_lock_wait_timeout= @save_innodb_lock_wait_timeout;
set @@global.slave_transaction_retries= @save_slave_trans_retries;
include/start_slave.inc
include/rpl_end.inc
# End of rpl_sql_thd_start_errno_cleared.test
mysql-test/suite/rpl/t/rpl_sql_thd_start_errno_cleared.test
0 → 100644
View file @
6a470db5
#
# Ensure that when the slave restarts, the last error code displayed by
# SHOW SLAVE STATUS is cleared before Slave_SQL_Running is set.
#
# To ensure that, this test uses the debug_sync mechanism to pause an errored
# and restarting slave's SQL thread after it has set its running state to YES,
# and then ensures that Last_SQL_Errno is 0. The slave error is a forced innodb
# row lock timeout.
#
#
# References
# MDEV-31177: SHOW SLAVE STATUS Last_SQL_Errno Race Condition on Errored
# Slave Restart
#
source
include
/
have_binlog_format_row
.
inc
;
source
include
/
have_innodb
.
inc
;
source
include
/
have_debug
.
inc
;
source
include
/
have_debug_sync
.
inc
;
source
include
/
master
-
slave
.
inc
;
--
connection
master
create
table
t1
(
a
int
primary
key
,
b
int
)
engine
=
innodb
;
insert
t1
values
(
1
,
1
);
--
source
include
/
save_master_gtid
.
inc
--
connection
slave
--
source
include
/
sync_with_master_gtid
.
inc
--
source
include
/
stop_slave
.
inc
set
@
save_innodb_lock_wait_timeout
=
@@
global
.
innodb_lock_wait_timeout
;
set
@
save_slave_trans_retries
=
@@
global
.
slave_transaction_retries
;
set
@@
global
.
innodb_lock_wait_timeout
=
1
;
set
@@
global
.
slave_transaction_retries
=
0
;
--
connection
master
update
t1
set
b
=
b
+
10
where
a
=
1
;
--
source
include
/
save_master_gtid
.
inc
--
connection
slave1
BEGIN
;
--
eval
SELECT
*
FROM
t1
WHERE
a
=
1
FOR
UPDATE
--
connection
slave
--
source
include
/
start_slave
.
inc
--
let
$slave_sql_errno
=
1205
--
source
include
/
wait_for_slave_sql_error
.
inc
--
connection
slave1
ROLLBACK
;
--
connection
slave
set
@
save_dbug
=
@@
global
.
debug_dbug
;
set
@@
global
.
debug_dbug
=
"+d,delay_sql_thread_after_release_run_lock"
;
--
source
include
/
start_slave
.
inc
set
debug_sync
=
"now wait_for sql_thread_run_lock_released"
;
--
let
$sql_running
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_SQL_Running
,
1
)
--
echo
# Validating that the SQL thread is running..
if
(
`SELECT strcmp("$sql_running", "YES") != 0`
)
{
--
echo
# ..failed
--
echo
# Slave_SQL_Running: $sql_running
--
die
Slave
SQL
thread
is
not
running
}
--
echo
# ..success
--
let
$last_error
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Last_SQL_Errno
,
1
)
--
echo
# Validating that Last_SQL_Errno is cleared..
if
(
$last_error
)
{
--
echo
# ..failed
--
echo
# Last_SQL_Errno: $last_error
--
die
SHOW
SLAVE
STATUS
shows
the
error
from
the
last
session
on
startup
}
--
echo
# ..success
set
debug_sync
=
"now signal sql_thread_continue"
;
set
@@
global
.
debug_dbug
=
@
saved_dbug
;
set
debug_sync
=
"RESET"
;
--
echo
# Cleanup
--
connection
master
drop
table
t1
;
--
connection
slave
--
source
include
/
stop_slave
.
inc
set
@@
global
.
innodb_lock_wait_timeout
=
@
save_innodb_lock_wait_timeout
;
set
@@
global
.
slave_transaction_retries
=
@
save_slave_trans_retries
;
--
source
include
/
start_slave
.
inc
--
source
include
/
rpl_end
.
inc
--
echo
# End of rpl_sql_thd_start_errno_cleared.test
sql/mysqld.cc
View file @
6a470db5
...
...
@@ -4346,6 +4346,8 @@ static int init_common_variables()
return
1
;
}
if
(
tls_version
&
(
VIO_TLSv1_0
+
VIO_TLSv1_1
))
sql_print_warning
(
"TLSv1.0 and TLSv1.1 are insecure and should not be used for tls_version"
);
#ifdef WITH_WSREP
/*
...
...
sql/slave.cc
View file @
6a470db5
...
...
@@ -5322,6 +5322,19 @@ pthread_handler_t handle_slave_sql(void *arg)
DBUG_ASSERT
(
rli
->
inited
);
DBUG_ASSERT
(
rli
->
mi
==
mi
);
/*
Reset errors for a clean start (otherwise, if the master is idle, the SQL
thread may execute no Query_log_event, so the error will remain even
though there's no problem anymore). Do not reset the master timestamp
(imagine the slave has caught everything, the STOP SLAVE and START SLAVE:
as we are not sure that we are going to receive a query, we want to
remember the last master timestamp (to say how many seconds behind we are
now.
But the master timestamp is reset by RESET SLAVE & CHANGE MASTER.
*/
rli
->
clear_error
();
mysql_mutex_lock
(
&
rli
->
run_lock
);
DBUG_ASSERT
(
!
rli
->
slave_running
);
errmsg
=
0
;
...
...
@@ -5398,17 +5411,16 @@ pthread_handler_t handle_slave_sql(void *arg)
mysql_mutex_unlock
(
&
rli
->
run_lock
);
mysql_cond_broadcast
(
&
rli
->
start_cond
);
/*
Reset errors for a clean start (otherwise, if the master is idle, the SQL
thread may execute no Query_log_event, so the error will remain even
though there's no problem anymore). Do not reset the master timestamp
(imagine the slave has caught everything, the STOP SLAVE and START SLAVE:
as we are not sure that we are going to receive a query, we want to
remember the last master timestamp (to say how many seconds behind we are
now.
But the master timestamp is reset by RESET SLAVE & CHANGE MASTER.
*/
rli
->
clear_error
();
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF
(
"delay_sql_thread_after_release_run_lock"
,
{
const
char
act
[]
=
"now "
"signal sql_thread_run_lock_released "
"wait_for sql_thread_continue"
;
DBUG_ASSERT
(
debug_sync_service
);
DBUG_ASSERT
(
!
debug_sync_set_action
(
current_thd
,
STRING_WITH_LEN
(
act
)));
};);
#endif
rli
->
parallel
.
reset
();
//tell the I/O thread to take relay_log_space_limit into account from now on
...
...
sql/sys_vars.cc
View file @
6a470db5
...
...
@@ -3842,7 +3842,7 @@ static Sys_var_set Sys_tls_version(
"TLS protocol version for secure connections."
,
READ_ONLY
GLOBAL_VAR
(
tls_version
),
CMD_LINE
(
REQUIRED_ARG
),
tls_version_names
,
DEFAULT
(
VIO_TLSv1_
1
|
VIO_TLSv1_
2
|
VIO_TLSv1_3
));
DEFAULT
(
VIO_TLSv1_2
|
VIO_TLSv1_3
));
static
Sys_var_mybool
Sys_standard_compliant_cte
(
"standard_compliant_cte"
,
...
...
sql/wsrep_notify.cc
View file @
6a470db5
...
...
@@ -21,6 +21,13 @@
void
wsrep_notify_status
(
enum
wsrep
::
server_state
::
state
status
,
const
wsrep
::
view
*
view
)
{
if
(
!
view
)
{
WSREP_DEBUG
(
"wsrep_notify_status server not yet ready : wsrep_ready=%d status %d"
,
wsrep_ready
,
(
int
)
status
);
return
;
}
if
(
!
wsrep_notify_cmd
||
0
==
strlen
(
wsrep_notify_cmd
))
{
WSREP_INFO
(
"wsrep_notify_cmd is not defined, skipping notification."
);
...
...
sql/wsrep_utils.h
View file @
6a470db5
...
...
@@ -189,7 +189,11 @@ class Config_state
void
set
(
enum
wsrep
::
server_state
::
state
status
)
{
wsrep_notify_status
(
status
);
if
(
status
==
wsrep
::
server_state
::
s_donor
||
status
==
wsrep
::
server_state
::
s_synced
)
wsrep_notify_status
(
status
,
&
view_
);
else
wsrep_notify_status
(
status
);
lock
();
status_
=
status
;
...
...
storage/innobase/fsp/fsp0fsp.cc
View file @
6a470db5
...
...
@@ -2762,13 +2762,26 @@ fseg_free_extent(
not_full_n_used
-
descr_n_used
);
}
std
::
vector
<
uint8_t
>
going_to_free
;
static_assert
(
FSP_EXTENT_SIZE_MIN
==
256
,
"compatibility"
);
static_assert
(
FSP_EXTENT_SIZE_MAX
==
64
,
"compatibility"
);
for
(
uint32_t
i
=
0
;
i
<
FSP_EXTENT_SIZE
;
i
++
)
{
if
(
!
xdes_is_free
(
descr
,
i
))
{
buf_page_free
(
space
,
first_page_in_extent
+
i
,
mtr
);
going_to_free
.
emplace_back
(
uint8_t
(
i
)
);
}
}
return
fsp_free_extent
(
space
,
page
,
mtr
);
if
(
dberr_t
err
=
fsp_free_extent
(
space
,
page
,
mtr
))
{
return
err
;
}
for
(
uint32_t
i
:
going_to_free
)
{
mtr
->
free
(
*
space
,
first_page_in_extent
+
i
);
buf_page_free
(
space
,
first_page_in_extent
+
i
,
mtr
);
}
return
DB_SUCCESS
;
}
/** Frees part of a segment. This function can be used to free
...
...
win/packaging/heidisql.wxi.in
View file @
6a470db5
...
...
@@ -8,7 +8,7 @@
Win64="no"
/>
</Property>
<?define pluginlist=auth_gssapi_client.dll;
mysql_clear_password.dll;sha256_password.dll;caching_sha2_password.dll;pvio_npipe.dll;dialog.dll;pvio_shmem
.dll?>
<?define pluginlist=auth_gssapi_client.dll;
auth_named_pipe.dll;caching_sha2_password.dll;client_ed25519.dll;dialog.dll;mysql_clear_password.dll;pvio_npipe.dll;pvio_shmem.dll;sha256_password
.dll?>
<DirectoryRef Id="MariaDBShared">
<Directory Id="D.HeidiSQL" Name="HeidiSQL">
<Component Id="component.HeidiSQL" Guid="96ea3879-5320-4098-8f26-2f655d2f716c" Win64="no">
...
...
wsrep-lib
@
151d4f85
Subproject commit 1
73693f2eeb61054424233fe85fde4086bed36be
Subproject commit 1
51d4f8591d26068afda997fb0d1f66b2f7f1964
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment