1. A printf-like function my_error_ensure is added. It additionally accepts
a format string which is not supposed to be used other that to ensure that
arguments match the format.
2. my_error has a dynamic and distributed infrastructure for error
registration with plugins and languages support. I have decided that this
should be preserved. The format didn't change, the registration mechanism
is preserved as well.
Instead additional printf-compatible ensure-format string is generated for
each format string in errmsg-utf8.txt to be passed to my_error_ensure.
3. my_error becomes a macro that translates into my_error_ensure call,
passing additionally an ensure-format string.
This preserves the calling protocol, but the error code cannot be dynamic
anymore -- my_error_ensure should be used instead there, and it's up to
caller to make sure that arguments match the error code. See examples in
the patch.
4. For EE_* errors ensure strings are also added directly in the code.
The usage stays seamless.
For HA_ERR_* no ensure strings are added, because they are trivial, and
are used mostly dynamically anyway. It is possible to easily add them if
one wants though.
5. External plugins will still use good old service functions
The reason was that WSREP code in mysql_create_or_drop_trigge() did
jump to an exit label that did not do proper cleanup of state.
Fixed by ensuring that also WSREP code goes trough the cleanup process.
2c90dc0...
by
Julius Goryavsky <email address hidden>
b2556b2...
by
Julius Goryavsky <email address hidden>
MDEV-25719: stunnel uses "verifyChain" without subject checks
Another batch of changes that should make the SST process
more reliable in all scenarios:
1) Added hostname or CN verification when stunnel is used
with certificate chain verification (verifyChain = yes);
2) Added check for the absence of the stunnel utility for
mtr tests;
3) Deletion of working files before and after SST is done
more accurately;
4) rsync on joiner can be run even if the path to its
configuration file contains spaces;
5) More accurate directory creation (for data files and
for logs);
6) IST with mysqldump no longer turns off statement logging;
7) Reset password for mysqldump when password is empty but
username is specified;
8) More reliable quoting when generating statements in
wsrep_sst_mysqldump;
9) Added explicit generation of 2048-bit Diffie-Hellman
parameters for sockat < 1.7.3, by analogy with xtrabackup;
10) Compression parameters for qpress are read from all
suitable server groups in configuration file, as well as
from the [sst] and [xtrabackup] groups;
11) Added a test that checks compression using qpress;
12) Checking for optional utilities is modified to work even
if they implemented as built-in shell commands (unlikely
on real systems, but more reliable).