From 7b032b01cd94e5c96c527ad3dc620e255961a80d Mon Sep 17 00:00:00 2001 From: Monty Date: Thu, 16 Mar 2023 17:57:34 +0200 Subject: [PATCH 1/2] Fixed newly introduced bug in scripts/mysql_install_db In some cases, the errors would not be written to the log. This was however not critical as in most cases mysql_install_db should not normally write anything to the log. --- scripts/mysql_install_db.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 065aa7bd3fe..3b14437b5d1 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -24,7 +24,6 @@ builddir="" ldata="@localstatedir@" langdir="" srcdir="" -log_error="" args="" defaults="" @@ -551,12 +550,20 @@ else filter_cmd_line="cat" fi -# Disable log error if the user don't have write access to the directory. -# This is common when a user tries to install a personal mariadbd server -if test -n $log_error +# Disable log error if the user don't have right to write/create the file +# This is common when a user tries to install a personal mariadbd server and +# the global config in /etc is using --log-error. +# The server will internally change log-error to stderr to stderr if it cannot +# write the the log file. This code only disables the error message from a not +# writable log-error, which can be confusing. +if test -n "$log_error" then - if test ! -w $log_error + if test \( -e "$log_error" -a \! -w "$log_error" \) -o \( ! -e "$log_error" -a ! -w "`dirname "$log_error"`" \) then + if test -n "$verbose" + then + echo "resetting log-error '$log_error' because no write access" + fi log_error="" args="$args --skip-log-error" fi From 32a53a66df0369a446db1e41f5123afe62e793fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 20 Mar 2023 10:32:35 +0200 Subject: [PATCH 2/2] MDEV-26827 fixup: Remove a bogus assertion We can have dirty_blocks=0 when buf_flush_page_cleaner() is being woken up to write out or evict pages from the buf_pool.LRU list. --- storage/innobase/buf/buf0flu.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index 326636e0c4d..484f6a3abb7 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -2324,7 +2324,6 @@ static void buf_flush_page_cleaner() break; const ulint dirty_blocks= UT_LIST_GET_LEN(buf_pool.flush_list); - ut_ad(dirty_blocks); /* We perform dirty reads of the LRU+free list lengths here. Division by zero is not possible, because buf_pool.flush_list is guaranteed to be nonempty, and it is a subset of buf_pool.LRU. */