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
ea40c75c
Commit
ea40c75c
authored
May 25, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.4 into 10.5
parents
a0e4853e
99c8aed0
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
44 additions
and
230 deletions
+44
-230
mysql-test/suite/galera/disabled.def
mysql-test/suite/galera/disabled.def
+0
-4
mysql-test/suite/galera/r/GCF-1081.result
mysql-test/suite/galera/r/GCF-1081.result
+0
-47
mysql-test/suite/galera/r/galera_kill_largechanges.result
mysql-test/suite/galera/r/galera_kill_largechanges.result
+0
-24
mysql-test/suite/galera/r/galera_var_retry_autocommit.result
mysql-test/suite/galera/r/galera_var_retry_autocommit.result
+14
-15
mysql-test/suite/galera/t/GCF-1081.test
mysql-test/suite/galera/t/GCF-1081.test
+0
-72
mysql-test/suite/galera/t/galera_kill_largechanges.test
mysql-test/suite/galera/t/galera_kill_largechanges.test
+0
-50
mysql-test/suite/galera/t/galera_pc_ignore_sb.cnf
mysql-test/suite/galera/t/galera_pc_ignore_sb.cnf
+11
-0
mysql-test/suite/galera/t/galera_var_retry_autocommit.test
mysql-test/suite/galera/t/galera_var_retry_autocommit.test
+9
-7
storage/innobase/include/trx0sys.h
storage/innobase/include/trx0sys.h
+2
-2
storage/innobase/lock/lock0lock.cc
storage/innobase/lock/lock0lock.cc
+2
-2
storage/innobase/srv/srv0srv.cc
storage/innobase/srv/srv0srv.cc
+6
-7
No files found.
mysql-test/suite/galera/disabled.def
View file @
ea40c75c
...
...
@@ -10,7 +10,6 @@
#
##############################################################################
GCF-1081 : MDEV-18283 Galera test failure on galera.GCF-1081
GCF-939 : MDEV-21520 galera.GCF-939
MW-329 : MDEV-19962 Galera test failure on MW-329
galera_as_slave_ctas : MDEV-28378 timeout
...
...
@@ -20,10 +19,7 @@ galera_bf_kill_debug : MDEV-24485 wsrep::client_state::do_acquire_ownership(): A
galera_bf_lock_wait : MDEV-21597 wsrep::transaction::start_transaction(): Assertion `active() == false' failed
galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges
galera_mdl_race : MDEV-21524 galera.galera_mdl_race
galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails
galera_pc_ignore_sb : MDEV-20888 galera.galera_pc_ignore_sb
galera_pc_recovery : MDEV-25199 cluster fails to start up
galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim
galera_trigger : MDEV-24048 galera.galera_trigger MTR fails: Result content mismatch
...
...
mysql-test/suite/galera/r/GCF-1081.result
deleted
100644 → 0
View file @
a0e4853e
connection node_2;
connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, 0), (3, 0);
CREATE PROCEDURE proc_update ()
BEGIN
UPDATE t1 SET f2 = 1 where f1 > 0;
END|
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
connection node_1;
CALL proc_update ();;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
connection node_1a;
SET GLOBAL DEBUG = 'd,sync.wsrep_before_BF_victim_unlock';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
connection node_2;
INSERT INTO t1 VALUES (2, 2);;
connection node_1a;
SET SESSION DEBUG_SYNC = 'now WAIT_FOR sync.wsrep_before_BF_victim_unlock_reached';
SET GLOBAL DEBUG = '';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
connection node_1a;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
connection node_2;
SELECT * FROM t1;
f1 f2
1 1
2 2
3 1
connection node_1;
SELECT * FROM t1;
f1 f2
1 1
2 2
3 1
wsrep_local_replays
1
DROP PROCEDURE proc_update;
DROP TABLE t1;
mysql-test/suite/galera/r/galera_kill_largechanges.result
deleted
100644 → 0
View file @
a0e4853e
connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10),(11);
CREATE TABLE t1 (f1 VARCHAR(128)) ENGINE=InnoDB;
connection node_2;
Killing server ...
connection node_1;
INSERT INTO t1 SELECT REPEAT('a', 128) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
connection node_2;
connection node_2a;
SELECT COUNT(*) FROM t1;
COUNT(*)
1771561
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE
2
connection node_1;
DROP TABLE t1;
DROP TABLE ten;
mysql-test/suite/galera/r/galera_var_retry_autocommit.result
View file @
ea40c75c
...
...
@@ -12,9 +12,9 @@ connection node_2;
TRUNCATE TABLE t1;
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT COUNT(*)
= 0
FROM t1;
COUNT(*)
= 0
1
SELECT COUNT(*) FROM t1;
COUNT(*)
0
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
connection node_1;
...
...
@@ -27,9 +27,9 @@ SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
connection node_2;
TRUNCATE TABLE t1;
connection node_1;
SELECT COUNT(*)
= 1
FROM t1;
COUNT(*)
= 1
1
SELECT COUNT(*) FROM t1;
COUNT(*)
0
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
connection node_1;
...
...
@@ -44,18 +44,17 @@ connection node_2;
TRUNCATE TABLE t1;
connection node_1a;
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
SELECT COUNT(*)
= 0
FROM t1;
COUNT(*)
= 0
1
SELECT COUNT(*) FROM t1;
COUNT(*)
0
SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_cert';
connection node_2;
TRUNCATE TABLE t1;
connection node_1a;
SELECT COUNT(*)
= 0
FROM t1;
COUNT(*)
= 0
1
SELECT COUNT(*) FROM t1;
COUNT(*)
0
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SET DEBUG_SYNC = 'RESET';
SET GLOBAL debug_dbug = NULL;
DROP TABLE t1;
...
...
@@ -66,8 +65,8 @@ SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 64';
INSERT INTO t1 VALUES (5);
connection node_1;
SELECT COUNT(*)
= 1
FROM t1;
COUNT(*)
= 1
SELECT COUNT(*) FROM t1;
COUNT(*)
1
SET DEBUG_SYNC = 'RESET';
SET GLOBAL debug_dbug = NULL;
...
...
mysql-test/suite/galera/t/GCF-1081.test
deleted
100644 → 0
View file @
a0e4853e
#
# GCF-1081 - Assertion `!thd->sp_runtime_ctx`
#
# Test replaying of stored procedures
#
--
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
--
let
$wsrep_local_replays_old
=
`SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
,
f2
INTEGER
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
1
,
0
),
(
3
,
0
);
DELIMITER
|
;
CREATE
PROCEDURE
proc_update
()
BEGIN
UPDATE
t1
SET
f2
=
1
where
f1
>
0
;
END
|
DELIMITER
;
|
# Block the SP
--
connect
node_1a
,
127.0
.
0.1
,
root
,
,
test
,
$NODE_MYPORT_1
--
let
$galera_sync_point
=
commit_monitor_master_enter_sync
--
source
include
/
galera_set_sync_point
.
inc
--
connection
node_1
--
send
CALL
proc_update
();
# Wait until SP is blocked
--
connection
node_1a
SET
SESSION
wsrep_sync_wait
=
0
;
--
source
include
/
galera_wait_sync_point
.
inc
# Issue a conflicting insert on node #2
--
connection
node_1a
SET
GLOBAL
debug_dbug
=
'd,sync.wsrep_before_BF_victim_unlock'
;
--
connection
node_2
--
send
INSERT
INTO
t1
VALUES
(
2
,
2
);
# Wait until it BF aborts the SP
--
connection
node_1a
SET
SESSION
DEBUG_SYNC
=
'now WAIT_FOR sync.wsrep_before_BF_victim_unlock_reached'
;
SET
GLOBAL
debug_dbug
=
''
;
# Unblock the SP
--
connection
node_1a
--
source
include
/
galera_clear_sync_point
.
inc
--
source
include
/
galera_signal_sync_point
.
inc
--
connection
node_2
--
reap
SELECT
*
FROM
t1
;
# SP succeeds
--
connection
node_1
--
reap
SELECT
*
FROM
t1
;
# wsrep_local_replays has increased by 1
--
let
$wsrep_local_replays_new
=
`SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
--
disable_query_log
--
eval
SELECT
$wsrep_local_replays_new
-
$wsrep_local_replays_old
AS
wsrep_local_replays
;
--
enable_query_log
DROP
PROCEDURE
proc_update
;
DROP
TABLE
t1
;
mysql-test/suite/galera/t/galera_kill_largechanges.test
deleted
100644 → 0
View file @
a0e4853e
#
# This test kill -9-s a slave while a large update has been performed on the master. SST is performed.
#
--
source
include
/
big_test
.
inc
--
source
include
/
galera_cluster
.
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_1
# Enable the master to continue running during the split-brain situation that
# occurs when the slave is killed
--
let
$wsrep_provider_options_orig
=
`SELECT @@wsrep_provider_options`
SET
GLOBAL
wsrep_provider_options
=
'pc.ignore_sb=true'
;
CREATE
TABLE
ten
(
f1
INTEGER
)
ENGINE
=
InnoDB
;
INSERT
INTO
ten
VALUES
(
1
),
(
2
),
(
3
),
(
4
),
(
5
),
(
6
),
(
7
),
(
8
),
(
9
),
(
10
),(
11
);
CREATE
TABLE
t1
(
f1
VARCHAR
(
128
))
ENGINE
=
InnoDB
;
--
connection
node_2
--
source
include
/
kill_galera
.
inc
--
connection
node_1
# We create a 128Mb (or so) transaction that is larger than gcache. The size of the gcache is not adjustable dynamically
INSERT
INTO
t1
SELECT
REPEAT
(
'a'
,
128
)
FROM
ten
AS
a1
,
ten
AS
a2
,
ten
AS
a3
,
ten
AS
a4
,
ten
AS
a5
,
ten
AS
a6
;
--
connection
node_2
--
source
include
/
start_mysqld
.
inc
--
let
$galera_connection_name
=
node_2a
--
let
$galera_server_number
=
2
--
source
include
/
galera_connect
.
inc
--
connection
node_2a
SELECT
COUNT
(
*
)
FROM
t1
;
SELECT
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
--
connection
node_1
--
disable_query_log
--
eval
SET
GLOBAL
wsrep_provider_options
=
'$wsrep_provider_options_orig'
;
--
enable_query_log
--
let
$node_2
=
node_2a
--
source
include
/
auto_increment_offset_restore
.
inc
DROP
TABLE
t1
;
DROP
TABLE
ten
;
mysql-test/suite/galera/t/galera_pc_ignore_sb.cnf
0 → 100644
View file @
ea40c75c
!include ../galera_2nodes.cnf
[mysqld]
wsrep_debug=1
[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'
mysql-test/suite/galera/t/galera_var_retry_autocommit.test
View file @
ea40c75c
...
...
@@ -30,7 +30,7 @@ TRUNCATE TABLE t1;
--
connection
node_1
--
error
ER_LOCK_DEADLOCK
--
reap
SELECT
COUNT
(
*
)
=
0
FROM
t1
;
SELECT
COUNT
(
*
)
FROM
t1
;
SET
DEBUG_SYNC
=
'RESET'
;
DROP
TABLE
t1
;
...
...
@@ -54,8 +54,9 @@ SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
TRUNCATE
TABLE
t1
;
--
connection
node_1
--
error
0
,
ER_LOCK_DEADLOCK
--
reap
SELECT
COUNT
(
*
)
=
1
FROM
t1
;
SELECT
COUNT
(
*
)
FROM
t1
;
SET
DEBUG_SYNC
=
'RESET'
;
DROP
TABLE
t1
;
...
...
@@ -82,17 +83,17 @@ TRUNCATE TABLE t1;
--
connection
node_1a
SET
DEBUG_SYNC
=
'now WAIT_FOR wsrep_retry_autocommit_reached'
;
SELECT
COUNT
(
*
)
=
0
FROM
t1
;
SELECT
COUNT
(
*
)
FROM
t1
;
SET
DEBUG_SYNC
=
'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_cert'
;
--
connection
node_2
TRUNCATE
TABLE
t1
;
--
connection
node_1a
SELECT
COUNT
(
*
)
=
0
FROM
t1
;
SELECT
COUNT
(
*
)
FROM
t1
;
--
connection
node_1
--
error
ER_LOCK_DEADLOCK
--
error
0
,
ER_LOCK_DEADLOCK
--
reap
SET
DEBUG_SYNC
=
'RESET'
;
...
...
@@ -126,7 +127,7 @@ while ($count)
--
connection
node_1a
SET
DEBUG_SYNC
=
'now WAIT_FOR wsrep_retry_autocommit_reached'
;
SELECT
COUNT
(
*
)
=
1
FROM
t1
;
SELECT
COUNT
(
*
)
FROM
t1
;
SET
DEBUG_SYNC
=
'now SIGNAL wsrep_retry_autocommit_continue'
;
--
dec
$count
...
...
@@ -135,8 +136,9 @@ while ($count)
--
enable_query_log
--
connection
node_1
--
error
0
,
ER_LOCK_DEADLOCK
--
reap
SELECT
COUNT
(
*
)
=
1
FROM
t1
;
SELECT
COUNT
(
*
)
FROM
t1
;
SET
DEBUG_SYNC
=
'RESET'
;
SET
GLOBAL
debug_dbug
=
NULL
;
...
...
storage/innobase/include/trx0sys.h
View file @
ea40c75c
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 202
1
, MariaDB Corporation.
Copyright (c) 2017, 202
2
, MariaDB Corporation.
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 the Free Software
...
...
@@ -876,7 +876,7 @@ class trx_sys_t
/**
TRX_RSEG_HISTORY list length (number of committed transactions to purge)
*/
MY_ALIGNED
(
CACHE_LINE_SIZE
)
Atomic_counter
<
uint32
_t
>
rseg_history_len
;
MY_ALIGNED
(
CACHE_LINE_SIZE
)
Atomic_counter
<
size
_t
>
rseg_history_len
;
/** List of all transactions. */
thread_safe_trx_ilist_t
trx_list
;
...
...
storage/innobase/lock/lock0lock.cc
View file @
ea40c75c
...
...
@@ -4545,14 +4545,14 @@ lock_print_info_summary(
fprintf
(
file
,
"Purge done for trx's n:o < "
TRX_ID_FMT
" undo n:o < "
TRX_ID_FMT
" state: %s
\n
"
"History list length %u
\n
"
,
"History list length %
z
u
\n
"
,
purge_sys
.
tail
.
trx_no
,
purge_sys
.
tail
.
undo_no
,
purge_sys
.
enabled
()
?
(
purge_sys
.
running
()
?
"running"
:
purge_sys
.
paused
()
?
"stopped"
:
"running but idle"
)
:
"disabled"
,
uint32
_t
{
trx_sys
.
rseg_history_len
});
size
_t
{
trx_sys
.
rseg_history_len
});
#ifdef PRINT_NUM_OF_LOCK_STRUCTS
fprintf
(
file
,
...
...
storage/innobase/srv/srv0srv.cc
View file @
ea40c75c
...
...
@@ -523,9 +523,8 @@ static srv_sys_t srv_sys;
struct
purge_coordinator_state
{
/** Snapshot of the last history length before the purge call.*/
uint32
m_history_length
;
Atomic_counter
<
int
>
m_running
;
purge_coordinator_state
()
:
m_history_length
(),
m_running
(
0
)
{}
size_t
m_history_length
=
0
;
Atomic_counter
<
int
>
m_running
{
0
};
};
static
purge_coordinator_state
purge_state
;
...
...
@@ -1724,7 +1723,7 @@ static bool srv_purge_should_exit()
return
true
;
/* Slow shutdown was requested. */
if
(
const
uint32
_t
history_size
=
trx_sys
.
rseg_history_len
)
if
(
const
size
_t
history_size
=
trx_sys
.
rseg_history_len
)
{
static
time_t
progress_time
;
time_t
now
=
time
(
NULL
);
...
...
@@ -1733,7 +1732,7 @@ static bool srv_purge_should_exit()
progress_time
=
now
;
#if defined HAVE_SYSTEMD && !defined EMBEDDED_LIBRARY
service_manager_extend_timeout
(
INNODB_EXTEND_TIMEOUT_INTERVAL
,
"InnoDB: to purge %u transactions"
,
"InnoDB: to purge %
z
u transactions"
,
history_size
);
ib
::
info
()
<<
"to purge "
<<
history_size
<<
" transactions"
;
#endif
...
...
@@ -1784,13 +1783,13 @@ Atomic_counter<int> srv_purge_thread_count_changed;
/** Do the actual purge operation.
@param[in,out] n_total_purged total number of purged pages
@return length of history list before the last purge batch. */
static
uint32
_t
srv_do_purge
(
ulint
*
n_total_purged
)
static
size
_t
srv_do_purge
(
ulint
*
n_total_purged
)
{
ulint
n_pages_purged
;
static
ulint
count
=
0
;
static
ulint
n_use_threads
=
0
;
static
uint32
_t
rseg_history_len
=
0
;
static
size
_t
rseg_history_len
=
0
;
ulint
old_activity_count
=
srv_get_activity_count
();
static
ulint
n_threads
=
srv_n_purge_threads
;
...
...
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