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
0385c716
Commit
0385c716
authored
Oct 08, 2019
by
Julius Goryavsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-20626: MariaDB crash if wsrep_sst_method enabled without wsrep_cluster_address
parent
c3394870
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
124 additions
and
2 deletions
+124
-2
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+15
-2
mysql-test/suite/galera/r/MDEV-20626.result
mysql-test/suite/galera/r/MDEV-20626.result
+12
-0
mysql-test/suite/galera/t/MDEV-20626.test
mysql-test/suite/galera/t/MDEV-20626.test
+97
-0
No files found.
mysql-test/mysql-test-run.pl
View file @
0385c716
...
...
@@ -4996,18 +4996,31 @@ sub check_expected_crash_and_restart {
}
# Ignore any partial or unknown command
next
unless
$last_line
=~
/^
restart
/
;
next
unless
$last_line
=~
/^
(restart|try)
/
;
# If last line begins "restart:", the rest of the line is read as
# extra command line options to add to the restarted mysqld.
# Anything other than 'wait' or 'restart:' (with a colon) will
# result in a restart with original mysqld options.
my
$try
=
0
;
if
(
$last_line
=~
/restart:(.+)/
)
{
my
@rest_opt
=
split
('
',
$1
);
$mysqld
->
{'
restart_opts
'}
=
\
@rest_opt
;
}
elsif
(
$last_line
=~
/try:(.+)/
)
{
my
@rest_opt
=
split
('
',
$1
);
$mysqld
->
{'
restart_opts
'}
=
\
@rest_opt
;
$try
=
1
;
}
else
{
delete
$mysqld
->
{'
restart_opts
'};
}
unlink
(
$expect_file
);
if
(
$try
==
1
)
{
my
$handle
;
open
(
$handle
,'
>
',
$expect_file
)
or
die
("
Cant open expect file for write
");
print
$handle
"
wait
";
close
(
$handle
);
}
else
{
unlink
(
$expect_file
);
}
# Start server with same settings as last time
mysqld_start
(
$mysqld
,
$mysqld
->
{'
started_opts
'});
...
...
mysql-test/suite/galera/r/MDEV-20626.result
0 → 100644
View file @
0385c716
connection node_2;
connection node_1;
CALL mtr.add_suppression("Aborting");
connection node_1;
connection node_2;
connection node_2;
Shutting down server ...
connection node_1;
connection node_2;
Starting server ...
Starting server ...
connection node_1;
mysql-test/suite/galera/t/MDEV-20626.test
0 → 100644
View file @
0385c716
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
# Suppress expected warnings:
CALL
mtr
.
add_suppression
(
"Aborting"
);
# Save original auto_increment_offset values.
--
let
$node_1
=
node_1
--
let
$node_2
=
node_2
--
source
include
/
auto_increment_offset_save
.
inc
#
# We should count the number of "Assertion failed" warnings
# in the log file before and after testing. To do this we need
# to save original log file before testing:
#
--
let
TEST_LOG
=
$MYSQLTEST_VARDIR
/
log
/
mysqld
.
2.
err
--
perl
use
strict
;
my
$test_log
=
$ENV
{
'TEST_LOG'
}
or
die
"TEST_LOG not set"
;
my
$test_log_copy
=
$test_log
.
'.copy'
;
if
(
-
e
$test_log_copy
)
{
unlink
$test_log_copy
;
}
EOF
--
copy_file
$TEST_LOG
$TEST_LOG
.
copy
--
connection
node_2
--
let
$wsrep_provider_orig
=
`SELECT @@wsrep_provider`
# Initiate normal shutdown on the node 2 and
# waiting until shutdown has been completed:
--
echo
Shutting
down
server
...
--
source
include
/
shutdown_mysqld
.
inc
--
connection
node_1
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
1
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
--
source
include
/
wait_condition
.
inc
# Remove the "grastate.dat" file (to initiate new SST)
# and restart node 2 without cluster address:
--
connection
node_2
--
remove_file
$MYSQLTEST_VARDIR
/
mysqld
.
2
/
data
/
grastate
.
dat
--
let
$start_mysqld_params
=--
no
-
defaults
--
wsrep_on
=
ON
--
wsrep_provider
=
$wsrep_provider_orig
--
wsrep_sst_method
=
mariabackup
--
user
=
mysql
--
binlog_format
=
ROW
--
echo
Starting
server
...
--
exec
echo
"try:
$start_mysqld_params
"
>
$_expect_file_name
# Sleep to ensure that server exited...
--
sleep
30
# Restart node 2 with original cluster address:
--
let
$start_mysqld_params
=
--
echo
Starting
server
...
--
source
include
/
start_mysqld
.
inc
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
--
source
include
/
wait_condition
.
inc
--
connection
node_1
--
source
include
/
auto_increment_offset_restore
.
inc
#
# We should count the number of "Assertion failed" warnings
# in the log file during test phase - to print the error message
# if quantity of such warnings in log file increased at the end
# of the test:
#
--
perl
use
strict
;
my
$test_log
=
$ENV
{
'TEST_LOG'
}
or
die
"TEST_LOG not set"
;
my
$test_log_copy
=
$test_log
.
'.copy'
;
open
(
FILE
,
$test_log_copy
)
or
die
(
"Unable to open
$test_log_copy
: $!
\n
"
);
my
$initial
=
grep
(
/
Assertion
*
failed
/
gi
,
<
FILE
>
);
close
(
FILE
);
open
(
FILE
,
$test_log
)
or
die
(
"Unable to open
$test_log
: $!
\n
"
);
my
$count_warnings
=
grep
(
/
Assertion
*
failed
/
gi
,
<
FILE
>
);
close
(
FILE
);
if
(
$count_warnings
!=
$initial
)
{
my
$diff
=
$count_warnings
-
$initial
;
print
"Assertion failed
$diff
times.
\n
"
;
}
EOF
--
remove_file
$TEST_LOG
.
copy
--
source
include
/
auto_increment_offset_restore
.
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