Import only the required functions instead of all the functions from the
module to reduce the unnecessary functions in the namespace and prevent
shadowing. Note: All code changes are non-functional.
All new code of the whole pull request, including one or several
files that are either new files or modified ones, are contributed
under the BSD-new license. I am contributing on behalf of my
employer Amazon Web Services, Inc.
Fix a large amount of minor fixes to maintainer scripts and other done
downstream in the official Debian packaging.
Changes include:
38198d0b9e
> Limit check of running mysqld/mariadbd to system users (Closes: #1032047)
>
> If a random user has their own copy of mysqld/mariadbd running, the
> dpkg maintainer script should not care about it.
8116354d22
> Make error more helpful in case server restart fails (Related: #1033234)
>
> Bugs such as https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033234
> and https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/2011293
> show that currently dpkg stopping on service stop/start does not have
> a very helpful error message.
8675e97202
> Complement upstream commits with more complete mysql->mariadb conversion
>
> The upstream commit 952af4a1 missed some places where 'mysql' or
> 'MySQL' can and should be converted to use 'mariadb' or 'MariaDB'.
c983613300
> Fix indentation in Debian post and pre scripts
>
> There is several misindentation inside Debian post and pre
> installation scripts. False indentation with space as indent space
> should be 2 and indentation with tabs.
>
> Adopt upstream commit 7cbb45d1 in Debian by conserving customizations
> in:
> - debian/mariadb-server.postinst
> - debian/mariadb-server.postrm
> - debian/mariadb-server.preinst
d0bcab443f
> Ensure spaces are used everywhere instead of tabs for indentation
0300a9157c
> Complement previous upstream commits to fix Shellcheck issues
>
> - Unify if/then and while/do on separate lines
> - Fix indentation to be consistent
> - Use "$()" instead of backticks for subshells
> - Exit code cannot be -1, must be 0-255
> - Remove unused variables MYCHECK and MYCHECK_PARAMS
> - Rewrite messy command-line database calls to an easier to read form
> that does exactly the same
> - Use 'command -v' test instead of 'which'
>
> With this commit, all of debian/* is Shellcheck clean.
Also
* Update mariadb.conf.d template to tell users where to create logdir
if they are not using journald
* Remove use of work 'slave'
* Add minor workaround for Debian Bug #1022994 if TMPDIR is empty
* Make start/stop in maintainer scripts correctly check mariadbd
ownership and only start/stop processes owned by root or 'mysql'
* Remove obsolete 'NO_UPDATE_BUILD_VERSION=1' as it did not affect the
RocksDB build reproducibility as previously assumed
* Run 'wrap-and-sort -av'
There is no need for a character-set-server configuration when utf8mb4
is now the server default.
Also remove the character-set-collations as its no longer required and
the uca1400_ai_ci is now the default for all character sets that support
it. ref: MDEV-25829 / MDEV-34430.
Since MDEV-25829 Change default Unicode collation to uca1400_ai_ci
there is no need to set character-set-collations explicitly as its
the default.
Further mode the change in defaults affects all character sets that
support the uca1400_ai_ci collation.
utf8mb4_general_ci has been outdated for a while and contained loosely
standardized collations.
UCA-14.0.0 has a more defined collation with multiple benefit that new
users may not immediately consider, or may assume to be default.
By defining default collation for utf8mb4 to be uc1400_ai_ci newly
created tables will have a modern standard collation.
50-mariadb_safe.cnf was only ever intended to be a reference file.
With mariadbd-safe falling into disuse in Debian since systemd became
a service it was assumed this files wasn't used except on a few old
legacy init systems. Its assumed these users will have a configuration
already set.
It is however read by the mariabackup galera-sst script. This forks
off the logger process to write the output to /dev/log, which on a
systemd service the journalctl is reading anyway.
The real harm is on containers where there is now a MariaDB operator
that runs Galera based containers. In containers there is no /dev/log,
so information gets lost.
It would be much more direct just to go straight to stdout/error
like what would happen without this configuration.
Rather than risk the galera-sst scripts moving to the [mariadbd-safe]
group name introduced in a1211a4eda, we
remove the file for cleanness.
Add Modern Perl headers. Perl 5.16 is still fairly
old from 2012.
Enable UTF-8, warnings and make script 'strict'
Small fixes for perlcritic reported problems and some crashes
I/O layer ":utf8" used at line 268, column 16. Use ":encoding(UTF-8)" to get strict validation. (Severity: 5)
"return" statement with explicit "undef" at line 806, column 4. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 6844, column 4. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 7524, column 4. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 7527, column 4. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 7599, column 4. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 7602, column 4. See page 199 of PBP. (Severity: 5)
Expression form of "eval" at line 7784, column 4. See page 161 of PBP. (Severity: 5)
Expression form of "eval" at line 7806, column 4. See page 161 of PBP. (Severity: 5)
Glob written as <...> at line 8016, column 25. See page 167 of PBP. (Severity: 5)
"return" statement followed by "sort" at line 9195, column 60. Behavior is undefined if called in scalar context. (Severity: 5)
Expression form of "eval" at line 9846, column 10. See page 161 of PBP. (Severity: 5)
These are mainly internal files so is a low impact change.
The few scripts/mysql*sql where renames to mariadb_* prefix
on the name.
mysql-test renamed to mariadb-test in the final packages
Renames the upgrade state file, and ensures the old
file is properly removed when `mariadb-upgrade` tool is executed.
All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer
Amazon Web Services, Inc.