diff options
author | Monty <monty@mariadb.org> | 2022-01-04 20:09:40 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2022-01-20 15:14:59 +0200 |
commit | 0fd4d6d3bb77b9072305f0b1d5bebfb914ad55cc (patch) | |
tree | bb03110bbd39f7db0a64703744cbec3cbc3c4e86 /man | |
parent | d28d3aee10801ec8fb4cc484a3a7bcb108cf7da3 (diff) | |
download | mariadb-git-0fd4d6d3bb77b9072305f0b1d5bebfb914ad55cc.tar.gz |
MDEV-27068 running mariadb-upgrade in parallel make it hangs forever
MDEV-27107 prevent two mariadb-upgrade running in parallel
MDEV-27279 mariadb_upgrade add --check-if-upgrade-is-needed /
restrict tests to major version
Code is based of pull request from Daniel Black, but with a several
extensions.
- mysql_upgrade now locks the mysql_upgrade file with my_lock()
(Advisory record locking). This ensures that two mysql_upgrades
cannot be run in parallel.
- Added --check-if-upgrade-is-needed to mysql_upgrade. This will return
0 if one has to run mysql_upgrade.
Other changes:
- mysql_upgrade will now immediately exit if the major version and minor
version (two first numbers in the version string) is same as last run.
Before this change mysql_upgrade was run if the version string was different
from last run.
- Better messages when there is no need to run mysql_upgrade.
- mysql_upgrade --verbose now prints out a lot more information about
the version checking.
- mysql_upgrade --debug now uses default debug arguments if there is no
option to --debug
- "MySQL" is renamed to MariaDB in the messages
- mysql_upgrade version increased to 2.0
Notes
Verifying "prevent two mariadb-upgrade running in parallel" was
done in a debugger as it would be a bit complex to do that in mtr.
Reviewer: Danial Black <daniel@mariadb.org>
Diffstat (limited to 'man')
-rw-r--r-- | man/mysql_upgrade.1 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index 29e9478781c..5ea4b254a98 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -239,6 +239,21 @@ Old option accepted for backward compatibility but ignored\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysql_upgrade: check-if-upgrade-is-needed option +.\" check-if-upgrade-is-needed option: mysql_upgrade +\fB\-\-check\-if\-upgrade\-is\-needed\fR +.sp +Exit with a status code indicating if an upgrade is needed\&. Returns 0 if upgrade needed or current version couldn't be determined, 1 when no action required\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysql_upgrade: datadir option .\" datadir option: mysql_upgrade \fB\-\-datadir=\fR\fB\fIpath\fR\fR |