Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ps 7626 8.0 #3

Closed
wants to merge 178 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
3ee8ad0
PS-7097 Documetation for Thread Pool contains broken link
patrickbirch Jun 1, 2020
1a8fb71
Update License Book
bkandasa Jun 1, 2020
d043d30
Merge pull request #3938 from oleksandr-kachan/merge-mysql-5.6.49-part2
oleksandr-kachan Jul 21, 2020
2e91aa8
PS-7219: Correct PRODUCT_FULL variable
Jul 27, 2020
403d5d3
PS-7201 Release Notes for 5.6.49-89.0 (5.6) (#3960)
patrickbirch Jul 27, 2020
89be96b
Merge pull request #3963 from Sudokamikaze/PS-7219
Sudokamikaze Jul 28, 2020
dbc6d28
PS-4669 Document downgrade (#3717)
patrickbirch Sep 4, 2020
a805ba7
PS-6849: Backport MTR shutdown report implementation from 5.7
Mar 5, 2020
6be0935
PS-6849 Add JUnit reporting support to the MySQL test suite runner.
darnaut Mar 24, 2014
a5d30ee
PS-6849 Add "junit" test suite with deliberately failing tests
i-rinat Apr 14, 2020
5dd48bc
PS-6849 Add a deliberately failing unittests suite
i-rinat Apr 14, 2020
e8b4914
PS-6849 Add unittests timeout, include CTest output into JUnit report
i-rinat Apr 14, 2020
9c39b03
PS-7213 Add jenkins file for autobuilds
EvgeniyPatlan Sep 30, 2020
24092fa
Merge pull request #4063 from EvgeniyPatlan/5.6
EvgeniyPatlan Sep 30, 2020
7533766
PS-6849 Attach mysqld shutdown and valgrind reports to JUnit report
i-rinat Apr 14, 2020
fe046e9
PS-6849 Run unit tests under Valgrind too if it was enabled
i-rinat Apr 16, 2020
485facc
PS-6849 Mark self-skipping tests as skipped in JUnit reports
i-rinat Apr 16, 2020
e122287
PS-6849 Convey tests output to JUnit reports regardless of test failure
i-rinat Apr 16, 2020
5cb0d2a
PS-6849 Exclude tests skipped by framework from results xml
oleksandr-kachan Jun 19, 2020
180af02
Merge pull request #4073 from altmannmarcelo/5.6-PS-7346
altmannmarcelo Oct 14, 2020
f559da4
PS-7371 Fix 5.7 RST issues (5.7)
patrickbirch Oct 15, 2020
5d2e846
PS-7372 Document RocksDB status variable "rocksdb_additional_compacti…
patrickbirch Oct 15, 2020
69fd2d3
Merge pull request #4087 from inikep/PS-7374-5.6
inikep Oct 16, 2020
4adfb62
Merge branch 'PS-6849-5.6' into PS-6849-5.7
oleksandr-kachan Oct 16, 2020
17247b0
Merge branch 'PS-6849-5.7' into PS-6849-8.0
oleksandr-kachan Oct 19, 2020
d24863f
Implemented PS-7200 (Merge MySQL 5.6.50) (docs)
oleksandr-kachan Oct 19, 2020
80f40c7
Implemented PS-7200 (Merge MySQL 5.6.50 up to e453966634c2834c0886e0e…
oleksandr-kachan Oct 19, 2020
100e92e
Implemented PS-7200 (Merge MySQL 5.6.50 up to e453966634c2834c0886e0e…
oleksandr-kachan Oct 19, 2020
8c2de5a
Merge pull request #4091 from inikep/PS-7379-5.6
inikep Oct 20, 2020
9e8f26d
Merge pull request #4096 from oleksandr-kachan/merge-mysql-5.6.50-part1
oleksandr-kachan Oct 26, 2020
a5141c6
Document RocksDB variables rocksdb_use_default_sk_cf and rockdb_max_r…
patrickbirch Oct 27, 2020
3eeb5cb
PS-7399 Release Notes for 5.6.50-90.0 (5.6)
patrickbirch Oct 27, 2020
11481a7
PS-5955: Must not be possible to grant or revoke a role to/from utili…
dutow Jan 31, 2020
a7063f7
PS-7396 Review 8.0.22 Documentation for Master / Slave changes (8.0)
patrickbirch Oct 29, 2020
fdc3c27
PS-7394 Select correct VERSION file
EvgeniyPatlan Nov 2, 2020
7cc1232
Merge pull request #4115 from EvgeniyPatlan/5.7
EvgeniyPatlan Nov 2, 2020
17aaf46
Merge pull request #4081 from inikep/PS-7229-5.7
inikep Nov 4, 2020
6c3b39a
Implemented PS-7332 (Merge MySQL 5.7.32) (docs)
oleksandr-kachan Oct 19, 2020
9b18ebe
Implemented PS-7332 (Merge MySQL 5.7.32 up to 472e1887e97e3c620676c79…
oleksandr-kachan Nov 5, 2020
239e017
Merge pull request #4120 from inikep/PS-7229-5.7
inikep Nov 5, 2020
2b211df
PS-7419 Update document titles (5.6)
patrickbirch Nov 9, 2020
e75cc37
Implemented PS-7332 (Merge MySQL 5.7.32 up to 472e1887e97e3c620676c79…
oleksandr-kachan Nov 5, 2020
6ed9fb7
Backport Bug#28177861 INFINITE LOOP IN CHECKED_GETADDRINFO
tvale Nov 9, 2018
633ec08
PS-7332: Null merge PS 5.6.50 at commit 9e8f26d5dcf (merge-mysql-5.6.…
oleksandr-kachan Nov 10, 2020
4d4335f
PS-7400 Release Notes for 5.7.32-35
patrickbirch Nov 6, 2020
ffc8a26
PS-7419 Update document titles (5.7)
patrickbirch Nov 11, 2020
f70ddc6
Merge pull request #4126 from patrickbirch/ps-5.7-7419
patrickbirch Nov 12, 2020
5944088
Merge pull request #4082 from patrickbirch/ps-5.7-7371
patrickbirch Nov 12, 2020
1c6e68c
Merge pull request #4116 from oleksandr-kachan/merge-mysql-5.7.32-part1
oleksandr-kachan Nov 16, 2020
2796d2f
PS-7372 Document RocksDB status variable "rocksdb_additional_compacti…
patrickbirch Nov 24, 2020
3c7dc6f
PS-7097 Documentation for Thread Pool contains broken link (8.0)
patrickbirch Nov 24, 2020
8c8d152
PS-7332: Null merge PS 5.7.32 at commit 1c6e68c3a41 (merge-mysql-5.7.…
oleksandr-kachan Dec 2, 2020
cbcf96f
PS-7291: Allow option value validation to be run for 'set persist_only'
oleksandr-kachan Sep 21, 2020
2a3baa9
PS-7162 hotfix: UDF functions for PITR in PXC operator (custom --log-…
percona-ysorokin Dec 3, 2020
106fc62
Merge pull request #4142 from percona-ysorokin/PS-7162-8.0-binary_log…
percona-ysorokin Dec 4, 2020
ba662f0
PS-7454 Build changes for release
EvgeniyPatlan Dec 2, 2020
b372974
Merge pull request #4139 from oleksandr-kachan/PS-7332-null-merge
oleksandr-kachan Dec 4, 2020
6ce7faf
PS-7049: SELinux and AppArmor updates
kamil-holubicki Dec 3, 2020
e3e71c5
Merge pull request #4143 from EvgeniyPatlan/release-8.0.22-13
EvgeniyPatlan Dec 4, 2020
85f49bc
PS-7049: SELinux and AppArmor updates
kamil-holubicki Dec 4, 2020
9e4e41b
PS-7049: SELinux and AppArmor updates
kamil-holubicki Dec 7, 2020
31fd7a9
Merge pull request #4048 from oleksandr-kachan/PS-7291-8.0
oleksandr-kachan Dec 8, 2020
2031540
PS-7458 Fix format error and update Yum installation
patrickbirch Dec 7, 2020
830fd0c
PS-7401 Review and Update - Experimental Features (8.0)
patrickbirch Dec 8, 2020
db839d1
PS-7460 Inclulde libncurses to bunary tarball
EvgeniyPatlan Dec 8, 2020
b168cf9
Merge pull request #4146 from EvgeniyPatlan/release-8.0.22-13
EvgeniyPatlan Dec 8, 2020
e8e9c78
PS-7453 Document Binary Log UDFS (8.0)
patrickbirch Dec 2, 2020
0e2f6dc
PS-7454 Remove apparmor for mysqlrouter
EvgeniyPatlan Dec 10, 2020
0cc556b
Merge pull request #4148 from EvgeniyPatlan/release-8.0.22-13
EvgeniyPatlan Dec 10, 2020
1ef6e98
Merge pull request #3640 from dutow/ps-8.0-ps5955
dutow Dec 10, 2020
4dc42ab
PS-7469 Do not load apparmor profile
EvgeniyPatlan Dec 12, 2020
6f7822f
Merge pull request #4150 from EvgeniyPatlan/release-8.0.22-13
EvgeniyPatlan Dec 12, 2020
d8431be
Merge pull request #4152 from percona/release-8.0.22-13
EvgeniyPatlan Dec 14, 2020
4b459a3
Merge pull request #4140 from patrickbirch/ps-8.0-7453
patrickbirch Dec 14, 2020
140c7f0
Merge pull request #4144 from patrickbirch/ps-8.0-7458
patrickbirch Dec 14, 2020
dfbd21f
PS-7412 Release Notes for 8.0.22-13
patrickbirch Dec 3, 2020
a8c6066
Merge pull request #4134 from patrickbirch/ps-8.0-7097
patrickbirch Dec 14, 2020
dc140f2
PS-7343 Verify Documentation for encryption Features which are GA (8.…
patrickbirch Dec 14, 2020
e878769
Merge pull request #4145 from patrickbirch/ps-8.0-7401
patrickbirch Dec 14, 2020
a2d4577
PS-7395 Document RocksDB variables "rocksdb_use_default_sk_cf" and "r…
patrickbirch Nov 24, 2020
c331148
Merge pull request #4112 from patrickbirch/ps-8.0-7396
patrickbirch Dec 14, 2020
7b7dbe7
Merge pull request #4133 from patrickbirch/ps-8.0-7395
patrickbirch Dec 14, 2020
f200782
Merge pull request #4131 from patrickbirch/ps-8.0-7372
patrickbirch Dec 14, 2020
97d743a
PS-5179 Document other assorted changes because of upstream 8.0.13 me…
patrickbirch Dec 14, 2020
dd983bd
Merge pull request #4141 from patrickbirch/ps-8.0-7412
patrickbirch Dec 14, 2020
3e6642f
PS-7470 Update Yum installation instructions
patrickbirch Dec 14, 2020
cef693e
Merge pull request #4153 from patrickbirch/ps-8.0-7470
patrickbirch Dec 15, 2020
a2152ca
PS-7049: SELinux and AppArmor updates
kamil-holubicki Dec 17, 2020
e10776a
Merge pull request #4147 from kamil-holubicki/PS-7049-8.0.21
kamil-holubicki Dec 18, 2020
1da31d3
PS-7480 Rework automated builds
EvgeniyPatlan Dec 24, 2020
5f11b4d
Merge pull request #4157 from EvgeniyPatlan/8.0
EvgeniyPatlan Dec 29, 2020
d060c3d
PS-1956: Adjust datatype for some timers used for extended slow query…
oleksandr-kachan Jan 4, 2021
8993399
Merge branch 'PS-1956-5.6' into PS-1956-5.7
oleksandr-kachan Jan 4, 2021
e9232b7
PS-7410: Auto-detect and set performance-related RocksDB flags
inikep Oct 26, 2020
7afd4ec
Merge branch 'PS-7410-5.7' into PS-7410-8.0
inikep Jan 11, 2021
b13e1b5
PS-7493: clang-format checks stopped working on TravisCI and CircleCI
inikep Jan 12, 2021
1afdffa
Merge branch 'PS-7493-5.6' into PS-7493-5.7
inikep Jan 12, 2021
b5ab508
Merge branch 'PS-7493-5.7' into PS-7493-8.0
inikep Jan 12, 2021
2c1a567
Merge pull request #4168 from inikep/PS-7493-8.0
inikep Jan 12, 2021
dc29ff1
Merge branch 'PS-1956-5.7' into PS-1956-8.0
oleksandr-kachan Jan 12, 2021
baf8594
Merge pull request #4164 from inikep/PS-7410-8.0
inikep Jan 13, 2021
820cc37
PS-7290: Using RocksDB as a temp table can lead to an assertion on th…
inikep Jan 13, 2021
933b7d8
PS-7491: [8.0] Add krb5 libs which have krb5_ser_context_init symbol …
Jan 13, 2021
4e3d291
Merge pull request #3901 from oleksandr-kachan/PS-6849-8.0
oleksandr-kachan Jan 13, 2021
4e9d33b
PS-7492: Update slow log formatting for tmp tables related stats
oleksandr-kachan Jan 13, 2021
76dfa7d
Merge pull request #4162 from oleksandr-kachan/PS-1956-8.0
oleksandr-kachan Jan 14, 2021
a094468
Merge pull request #4171 from inikep/PS-7290-8.0
inikep Jan 14, 2021
e7da995
PS-7167: "slice1.compare.slice2" debug assertion
inikep Jan 14, 2021
168e792
Fix leak in Rdb_ha_data
yizhang82 Feb 8, 2020
fd65988
Extend support to add more active compaction jobs details from RocksD…
Pushapgl Feb 6, 2020
77bad69
Added more descriptive error when parsing cf options in RocksDB
Feb 15, 2020
271c368
update rocksdb_create_temporary_checkpoint testcase
luqun Mar 3, 2020
7d7efcc
Stabilize rocksdb.drop_cf_during_show_global_info in valgrind
Mar 5, 2020
10d89ff
Fix cleanup on rocksdb.drop_cf_before_show_deadlock_info test
Mar 5, 2020
b06f32b
Version-independent key packing
yizhang82 Oct 16, 2019
9722b1b
Make BIT, ENUM, SET covering for MyRocks
Mar 5, 2020
328d51a
Merge branch 'PS-7492-5.7' into PS-7492-8.0
oleksandr-kachan Jan 14, 2021
b18bc1a
Block Alter table with string indexed column to non-binary collation.
Feb 28, 2020
ab1b245
FB8-246 main.implicit_commit fails in debug compilation (#1117)
percona-ysorokin Mar 30, 2020
790a93e
add `INFORMATION_SCHEMA.ROCKSDB_COMPACTION_HISTORY` table
ajkr Apr 21, 2020
30b1381
remove unused functions ha_rocksdb::remove_rows
Feb 7, 2020
33e41cc
Optimize pack_with_varchar_space_pad handling for empty data
atish2196 Apr 25, 2020
00824ab
Support covering prefixed key for blob/text fields
Pushapgl Apr 23, 2020
ee10020
Added the optimizations in bitmap used for covering Index.
Pushapgl May 19, 2020
c264552
Save 2 bytes length from unpack_info value for secondary index.
Pushapgl May 20, 2020
9e58cc4
Better MyRocks init failure cleanup
yizhang82 Jul 15, 2020
b9245af
Use rocksdb::Status::IsPathNotFound instead of errno
yizhang82 Jul 15, 2020
25bde4e
Better cleanup in Myrocks initialization failure
TMBear Jul 28, 2020
30d47aa
Fix bypass bug in unpack info
yizhang82 Sep 10, 2019
32030de
PS-6074: NO_PAD collations should not use the space padded encoding
inikep May 5, 2020
7ec3b27
PS-7027: MyRocks: Optimized support for utf8mb4_bin and other binary …
inikep May 25, 2020
6bf08da
PS-7027: MyRocks: Add SK index-only scans for all remaining collations
inikep Aug 11, 2020
67be2d0
PS-7027: Fix EXPLAIN SELECT for RocksDB SKs
inikep Jun 25, 2020
f45c36c
Remove 'all fields in sk are covered read' assert
Sep 2, 2020
e916ffb
Add rocksdb_wsenv_path for initial WSEnvironment support
yizhang82 Jul 14, 2020
b7ebf72
convert db and table name to my_charset_filename during MyRocks DD va…
luqun Sep 1, 2020
02db383
Making rocksdb_max_bottom_pri_background_compactions dynamic
yoshinorim Sep 17, 2020
48676b6
Fix direct_io check
yizhang82 Sep 27, 2020
dbb92ee
Update to latest rocksdb and update MyRocks to fix build break
yizhang82 Oct 11, 2020
ab11131
PS-7225: Fix sporadically failing rpl and gr tests on Jenkins
venkatesh-prasad-v Jan 11, 2021
7b186c9
PS-7501 Perform version check only on autobuilds
EvgeniyPatlan Jan 15, 2021
3d545ea
Merge pull request #4175 from EvgeniyPatlan/8.0
EvgeniyPatlan Jan 15, 2021
2beaede
Merge pull request #4173 from inikep/PS-7167-8.0
inikep Jan 18, 2021
44e9aec
Merge pull request #4136 from inikep/PS-7310-8.0
inikep Jan 18, 2021
351354c
PS-7125 feature: Reloading X ssl certificates on ALTER INSTANCE RELOA…
dutow Aug 17, 2020
bbba362
Merge pull request #4166 from oleksandr-kachan/PS-7492-8.0
oleksandr-kachan Jan 18, 2021
8050c49
Merge pull request #4113 from venkatesh-prasad-v/8.0-PS-7225
venkatesh-prasad-v Jan 19, 2021
deaf1b4
PS-4894: Virtual column support for MyRocks
dutow Dec 2, 2020
fafece8
Merge pull request #3991 from dutow/ps-8.0-ps7125
dutow Jan 20, 2021
6076847
PS-7499: Improve error log when MyRocks fails with rocksdb_validate_t…
inikep Jan 20, 2021
73eae87
Merge branch 'PS-7499-5.7' into PS-7499-8.0
inikep Jan 20, 2021
34eae66
Merge pull request #4151 from dutow/ps-8.0-ps4894
dutow Jan 21, 2021
d60ebcb
PS-7504: Add ability to build tarball with Debug binaries (#4183)
Jan 21, 2021
6e5b392
PS-5846: MyRocks - Add support for default value expressions
inikep Jan 21, 2021
4170db8
Merge pull request #4180 from inikep/PS-7499-8.0
inikep Jan 21, 2021
653b7c2
PS-7520: Travis CI: compilation issues with boost with macOS
inikep Jan 25, 2021
6db932e
Merge pull request #4188 from inikep/PS-7520-8.0
inikep Jan 27, 2021
e34a52c
PS-7495 Block Tablespace DDL with Lock Table For Backup
rahulmalik87 Jan 15, 2021
217a11a
PS-7451 Document SELinux and AppArmor (8.0)
patrickbirch Dec 15, 2020
7f112ce
Merge pull request #4154 from patrickbirch/ps-8.0-7451
patrickbirch Jan 28, 2021
3f767ca
PS-7529 Update title
patrickbirch Jan 28, 2021
0e5ec91
Merge pull request #4190 from patrickbirch/ps-8.0-7529
patrickbirch Jan 28, 2021
4712c80
Merge pull request #4184 from inikep/PS-5846-8.0
inikep Jan 28, 2021
cfa9127
Merge pull request #4177 from rahulmalik87/PS-7495
rahulmalik87 Feb 2, 2021
2603ced
PS-7531 Add links
patrickbirch Jan 29, 2021
7642c5e
PS-7566: Fix changelog error for RHEL Software certification utility …
Feb 22, 2021
4c2ea7a
PS-7581: Allow to disable HAVE_AVX2 and -march=native RocksDB flags
inikep Feb 23, 2021
778863f
Merge pull request #4209 from inikep/PS-7581-8.0
inikep Feb 26, 2021
4b54b7e
update links to MySQL 8.0 Reference Manual
ziegenberg Feb 26, 2021
9edc9b7
PS-7364 Adaptive network buffers (#4178)
ldonoso Mar 2, 2021
ebb7d57
Merge pull request #4219 from ziegenberg/patch-1
patrickbirch Mar 5, 2021
815cbfd
Correct/Add README Links (#4210)
tom-basil Mar 5, 2021
d458b67
Merge pull request #4192 from patrickbirch/ps-8.0-7531
patrickbirch Mar 5, 2021
9fda6f4
PS-7587 rocksdb skip march param build flags
vorsel Mar 8, 2021
81b9c54
Merge pull request #4225 from vorsel/PS-7587_rocksdb_skip_march_param…
vorsel Mar 9, 2021
b781f34
PS-7618 Fix libmysqlclient creation
EvgeniyPatlan Mar 30, 2021
c3f4e1c
Merge pull request #4234 from EvgeniyPatlan/8.0
EvgeniyPatlan Mar 30, 2021
ecb6dfb
PS-7626 - Use an ad-hoc mutex to read net_buffer_shrink_interval
Apr 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PS-6849: Backport MTR shutdown report implementation from 5.7
mysql/mysql-server@8aeda36

Bug#30909369: MTR DOES NOT NOTICE A SERVER ABORT AFTER "BYE"

Issue:
======
After a test is run, when the server is shutdown, MTR
does not detect the exit status of the shutdown, and
reports that the test passed, even if the server crashes.

Fix:
====
Added a shutdown_report for every run of tests, which
will report if the shutdown of the servers was successful
or not. The exit status of shutdown is monitored and if
a failure is found, the error log is parsed and the
shutdown_report will contain the errors.

This also fixes Bug#29818311, which reported the same
problem.

Change-Id: I4d8043915f9b085bfbd25e811c957cd0b4809454
(cherry picked from commit 8aeda36)
Deepa Dixit authored and oleksandr-kachan committed Sep 9, 2020
commit a805ba7c7e5e9eb606d2785a9b92e47cb5e6e594
10 changes: 7 additions & 3 deletions mysql-test/lib/My/SafeProcess.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- cperl -*-
# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
@@ -228,6 +228,7 @@ sub shutdown {
my $shutdown_timeout= shift;
my @processes= @_;
_verbose("shutdown, timeout: $shutdown_timeout, @processes");
my $shutdown_status = 0;

return if (@processes == 0);

@@ -254,6 +255,9 @@ sub shutdown {
my $ret= $proc->wait_one($shutdown_timeout);
if ($ret != 0) {
push(@kill_processes, $proc);
} else {
my $exit_status = $proc->exit_status();
$shutdown_status = $exit_status if $exit_status;
}
# Only wait for the first process with shutdown timeout
$shutdown_timeout= 0;
@@ -272,7 +276,7 @@ sub shutdown {
}

# Return if all servers has exited
return if (@kill_processes == 0);
return $shutdown_status if (@kill_processes == 0);

foreach my $proc (@kill_processes){
$proc->start_kill();
@@ -282,7 +286,7 @@ sub shutdown {
$proc->wait_one(undef);
}

return;
return $shutdown_status;
}


131 changes: 113 additions & 18 deletions mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
@@ -325,6 +325,7 @@ sub set_term_args {
our $opt_user = "root";

our $opt_valgrind= 0;
my $shutdown_report = 0;
my $opt_valgrind_mysqld= 0;
my $opt_valgrind_mysqltest= 0;
my @valgrind_args;
@@ -568,6 +569,26 @@ sub main {

push @$completed, run_ctest() if $opt_ctest;

# Create minimalistic "test" for the reporting failures at shutdown
my $tinfo = My::Test->new(
name => 'shutdown_report',
shortname => 'shutdown_report',
);

# Set dummy worker id to align report with normal tests
$tinfo->{worker} = 0 if $opt_parallel > 1;
if ($shutdown_report) {
$tinfo->{result} = 'MTR_RES_FAILED';
$tinfo->{comment} = "Mysqld reported failures at shutdown, see above";
$tinfo->{failures} = 1;
} else {
$tinfo->{result} = 'MTR_RES_PASSED';
}
mtr_report_test($tinfo);
report_option('prev_report_length', 0);
push @$completed, $tinfo;


if ($opt_valgrind) {
# Create minimalistic "test" for the reporting
my $tinfo = My::Test->new
@@ -815,8 +836,10 @@ ($$$)
}
elsif ($line eq 'VALGREP' && $opt_valgrind) {
$valgrind_reports= 1;
}
else {
} elsif ($line eq 'SRV_CRASH') {
# Mysqld detected crash during shutdown
$shutdown_report = 1;
} else {
mtr_error("Unknown response: '$line' from client");
}

@@ -996,7 +1019,12 @@ ($)
}
elsif ($line eq 'BYE'){
mtr_report("Server said BYE");
stop_all_servers($opt_shutdown_timeout);
my $ret = stop_all_servers($opt_shutdown_timeout);
if (defined $ret and $ret != 0) {
shutdown_exit_reports();
$shutdown_report = 1;
}
print $server "SRV_CRASH\n" if $shutdown_report;
mark_time_used('restart');
my $valgrind_reports= 0;
if ($opt_valgrind_mysqld) {
@@ -1020,6 +1048,60 @@ ($)
exit(1);
}

# Search server logs for any crashes during mysqld shutdown
sub shutdown_exit_reports() {
my $found_report = 0;
my $clean_shutdown = 0;

foreach my $log_file (keys %mysqld_logs) {
my @culprits = ();
my $crash_rep = "";

my $LOGF = IO::File->new($log_file) or
mtr_error("Could not open file '$log_file' for reading: $!");

while (my $line = <$LOGF>) {
if ($line =~ /^CURRENT_TEST: (.+)$/) {
my $testname = $1;
# If we have a report, report it if needed and start new list of tests
if ($found_report or $clean_shutdown) {
# Make ready to collect new report
@culprits = ();
$found_report = 0;
$clean_shutdown = 0;
$crash_rep = "";
}
push(@culprits, $testname);
next;
}

# Clean shutdown
$clean_shutdown = 1 if $line =~ /.*Shutdown completed.*/;

# Mysqld crash at shutdown
$found_report = 1 if ($line =~ /.*Assertion.*/ or $line =~ /.*mysqld got signal.*/
or $line =~ /.*mysqld got exception.*/);

if ($found_report) {
$crash_rep .= $line;
}
}

if ($found_report) {
mtr_print("Shutdown report from $log_file after tests:\n", @culprits);
mtr_print_line();
print("$crash_rep\n");
} else {
# Print last 100 lines of log file since shutdown failed
# for some reason.
mtr_print("Shutdown report from $log_file after tests:\n", @culprits);
mtr_print_line();
my $reason = mtr_lastlinesfromfile($log_file, 100) . "\n";
print("$reason");
}
$LOGF = undef;
}
}

sub ignore_option {
my ($opt, $value)= @_;
@@ -4513,7 +4595,11 @@ ($)
my $check_res;
if ( restart_forced_by_test('force_restart') )
{
stop_all_servers($opt_shutdown_timeout);
my $ret = stop_all_servers($opt_shutdown_timeout);
if ($ret != 0) {
shutdown_exit_reports();
$shutdown_report = 1;
}
}
elsif ( $opt_check_testcases and
$check_res= check_testcase($tinfo, "after"))
@@ -5184,7 +5270,8 @@ ($)
# In these cases we may want valgrind report from normal termination
$tinfo->{'dont_kill_server'}= 1;
}
# Shotdown properly if not to be killed (for valgrind)

# Shutdown properly if not to be killed (for valgrind)
stop_all_servers($tinfo->{'dont_kill_server'} ? $opt_shutdown_timeout : 0);

$tinfo->{'result'}= 'MTR_RES_FAILED';
@@ -5495,8 +5582,10 @@ ($$)
unlink($mysqld->value('pid-file'));

my $output= $mysqld->value('#log-error');
# Remember this log file for valgrind error report search
$mysqld_logs{$output}= 1 if $opt_valgrind;

# Remember this log file for valgrind/shutdown error report search
$mysqld_logs{$output} = 1;

# Remember data dir for gmon.out files if using gprof
$gprof_dirs{$mysqld->value('datadir')}= 1 if $opt_gprof;

@@ -5541,8 +5630,8 @@ ()
mtr_verbose("Stopping all servers...");

# Kill all started servers
My::SafeProcess::shutdown($shutdown_timeout,
started(all_servers()));
my $ret = My::SafeProcess::shutdown($shutdown_timeout,
started(all_servers()));

# Remove pidfiles
foreach my $server ( all_servers() )
@@ -5552,8 +5641,8 @@ ()
}

# Mark servers as stopped
map($_->{proc}= undef, all_servers());

map($_->{proc} = undef, all_servers());
return $ret;
}


@@ -5759,17 +5848,18 @@ ($$)
my ($tinfo, @servers)= @_;

# Remember if we restarted for this test case (count restarts)
$tinfo->{'restarted'}= 1;
$tinfo->{'restarted'} = 1;
my $ret;

if ( join('|', @servers) eq join('|', all_servers()) )
{
# All servers are going down, use some kind of order to
# avoid too many warnings in the log files

mtr_report("Restarting all servers");
mtr_report("Restarting all servers");

# mysqld processes
My::SafeProcess::shutdown( $opt_shutdown_timeout, started(mysqlds()) );
# mysqld processes
$ret = My::SafeProcess::shutdown($opt_shutdown_timeout, started(mysqlds()));

# cluster processes
My::SafeProcess::shutdown( $opt_shutdown_timeout,
@@ -5779,9 +5869,14 @@ ($$)
{
mtr_report("Restarting ", started(@servers));

# Stop only some servers
My::SafeProcess::shutdown( $opt_shutdown_timeout,
started(@servers) );
# Stop only some servers
my $ret = My::SafeProcess::shutdown($opt_shutdown_timeout,
started(@servers) );
}

if ($ret) {
shutdown_exit_reports();
$shutdown_report = 1;
}

foreach my $server (@servers)