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
1e89d2a1
Commit
1e89d2a1
authored
Sep 23, 2024
by
Brandon Nesterenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-34122: Update tests to check message is provided
parent
66eae3ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
7 deletions
+55
-7
mysql-test/suite/rpl/r/rpl_semi_sync_cond_var_per_thd.result
mysql-test/suite/rpl/r/rpl_semi_sync_cond_var_per_thd.result
+18
-2
mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.test
mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.test
+37
-5
No files found.
mysql-test/suite/rpl/r/rpl_semi_sync_cond_var_per_thd.result
View file @
1e89d2a1
...
...
@@ -45,13 +45,21 @@ drop table t1, t2, t3;
# Here, debug_sync is used to pause the leader thread between reporting
# the binlogging to semi-sync, and starting the wait for ACK; and during
# this pause, semi-sync is manually switched off and on.
# Waiting for semi-sync to turn on..
connection slave;
connection master;
set @old_master_wait_point= @@global.rpl_semi_sync_master_wait_point;
set @old_master_wait_no_slave= @@global.rpl_semi_sync_master_wait_no_slave;
set @@global.rpl_semi_sync_master_wait_point= AFTER_SYNC;
set @@global.rpl_semi_sync_master_wait_no_slave= 1;
# Waiting for semi-sync to turn on..
connection slave;
connection master;
create table t (a int) engine=innodb;
connection slave;
# Wait no slave is on, so we don't need to slave on to wait for the
# ACK, and this way we guarantee the ACK doesn't come, so we can verify
# the informational message is displayed
connection slave;
include/stop_slave.inc
connection server_1;
start transaction;
insert into t values (0);
...
...
@@ -65,9 +73,13 @@ set @@global.rpl_semi_sync_master_enabled= 1;
# Resuming transaction to await ACK
set debug_sync= "now SIGNAL continue_commit";
connection server_1;
include/assert_grep.inc [Ensure error log shows that transaction is skipping its semi-sync wait]
# Cleanup
connection slave;
include/start_slave.inc
connection master;
drop table t;
connection slave;
#
# MDEV-34122.b: Test wait_point = AFTER_COMMIT
# Here, use a transaction with a non-transactional statement to write to
...
...
@@ -75,6 +87,9 @@ drop table t;
# transaction.
connection master;
set @@global.rpl_semi_sync_master_wait_point= AFTER_COMMIT;
# Waiting for semi-sync to turn on..
connection slave;
connection master;
create table tn (a int) engine=Aria;
start transaction;
insert into tn values (NULL);
...
...
@@ -85,4 +100,5 @@ commit;
connection master;
drop table tn;
set @@global.rpl_semi_sync_master_wait_point= @old_master_wait_point;
set @@global.rpl_semi_sync_master_wait_no_slave= @old_master_wait_no_slave;
include/rpl_end.inc
mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.test
View file @
1e89d2a1
...
...
@@ -96,22 +96,32 @@ drop table t1, t2, t3;
--
echo
# the binlogging to semi-sync, and starting the wait for ACK; and during
--
echo
# this pause, semi-sync is manually switched off and on.
--
echo
# Waiting for semi-sync to turn on..
--
connection
slave
let
$status_var
=
rpl_semi_sync_slave_status
;
let
$status_var_value
=
ON
;
source
include
/
wait_for_status_var
.
inc
;
--
connection
master
set
@
old_master_wait_point
=
@@
global
.
rpl_semi_sync_master_wait_point
;
set
@
old_master_wait_no_slave
=
@@
global
.
rpl_semi_sync_master_wait_no_slave
;
set
@@
global
.
rpl_semi_sync_master_wait_point
=
AFTER_SYNC
;
set
@@
global
.
rpl_semi_sync_master_wait_no_slave
=
1
;
--
echo
# Waiting for semi-sync to turn on..
let
$status_var
=
rpl_semi_sync_master_status
;
let
$status_var_value
=
ON
;
source
include
/
wait_for_status_var
.
inc
;
--
connection
slave
let
$status_var
=
rpl_semi_sync_slave_status
;
let
$status_var_value
=
ON
;
source
include
/
wait_for_status_var
.
inc
;
--
connection
master
create
table
t
(
a
int
)
engine
=
innodb
;
--
sync_slave_with_master
--
echo
# Wait no slave is on, so we don't need to slave on to wait for the
--
echo
# ACK, and this way we guarantee the ACK doesn't come, so we can verify
--
echo
# the informational message is displayed
--
connection
slave
--
source
include
/
stop_slave
.
inc
--
connection
server_1
start
transaction
;
insert
into
t
values
(
0
);
...
...
@@ -134,9 +144,20 @@ set debug_sync= "now SIGNAL continue_commit";
--
connection
server_1
--
reap
--
let
$assert_text
=
Ensure
error
log
shows
that
transaction
is
skipping
its
semi
-
sync
wait
--
let
$assert_select
=
Skipping
semi
-
sync
wait
for
transaction
--
let
$assert_file
=
$MYSQLTEST_VARDIR
/
log
/
mysqld
.
1.
err
--
let
$assert_count
=
1
--
let
$assert_only_after
=
CURRENT_TEST
--
source
include
/
assert_grep
.
inc
--
echo
# Cleanup
--
connection
slave
--
source
include
/
start_slave
.
inc
--
connection
master
drop
table
t
;
--
sync_slave_with_master
--
echo
#
...
...
@@ -148,6 +169,16 @@ drop table t;
--
connection
master
set
@@
global
.
rpl_semi_sync_master_wait_point
=
AFTER_COMMIT
;
--
echo
# Waiting for semi-sync to turn on..
let
$status_var
=
rpl_semi_sync_master_status
;
let
$status_var_value
=
ON
;
source
include
/
wait_for_status_var
.
inc
;
--
connection
slave
let
$status_var
=
rpl_semi_sync_slave_status
;
let
$status_var_value
=
ON
;
source
include
/
wait_for_status_var
.
inc
;
--
connection
master
create
table
tn
(
a
int
)
engine
=
Aria
;
start
transaction
;
insert
into
tn
values
(
NULL
);
...
...
@@ -159,5 +190,6 @@ commit;
--
connection
master
drop
table
tn
;
set
@@
global
.
rpl_semi_sync_master_wait_point
=
@
old_master_wait_point
;
set
@@
global
.
rpl_semi_sync_master_wait_no_slave
=
@
old_master_wait_no_slave
;
--
source
include
/
rpl_end
.
inc
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