Commit 2776635c authored by Daniel Black's avatar Daniel Black

MDEV-24788: mariadbd --help Can't lock aria control file

... '/var/lib/mysql/aria_log_control' for exclusive use, error: 11

As such don't lock under aria_readonly (which is set by opt_help in the handler
initialization.

Fixes: 8eba777c
parent 03678bcf
[ERROR] mariadbd: Can't lock aria aria_log_control for exclusive use, error: #. Will retry for 0 seconds
[ERROR] Plugin 'Aria' init function returned error.
[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
[Warning] Could not open mysql.plugin table: "Unknown storage engine 'Aria'". Some options may be missing from the help text
#
# Check that we don't write any data to wrong or not existing datadir
#
......
......@@ -2,15 +2,10 @@
# Check errors from mysqld--help when providing different datadir
#
# We can't run this test on windows as windows doesn't provide file locking
# which the first exec requires.
--source include/not_windows.inc
--let $args=--table-cache=5 --max-connections=10 --log-warnings=1 --silent-startup --lower-case-table-names=1 --help --verbose
--exec $MYSQLD_CMD $args > $MYSQL_TMP_DIR/mysqld--help2.txt 2> $MYSQL_TMP_DIR/mysqld--help2.err
--replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* // /control file '.*aria_log_control'/aria_log_control/ /error: \d+/error: #/
--replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* //
--cat_file $MYSQL_TMP_DIR/mysqld--help2.err
--echo #
......
......@@ -314,7 +314,7 @@ CONTROL_FILE_ERROR ma_control_file_open(my_bool create_if_missing,
errmsg= "Can't create file";
goto err;
}
if (lock_control_file(name, wait_for_lock))
if (!aria_readonly && lock_control_file(name, wait_for_lock))
{
error= CONTROL_FILE_LOCKED;
errmsg= lock_failed_errmsg;
......@@ -332,7 +332,7 @@ CONTROL_FILE_ERROR ma_control_file_open(my_bool create_if_missing,
}
/* lock it before reading content */
if (lock_control_file(name, wait_for_lock))
if (!aria_readonly && lock_control_file(name, wait_for_lock))
{
error= CONTROL_FILE_LOCKED;
errmsg= lock_failed_errmsg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment