summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2023-03-20 10:39:15 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2023-03-20 10:39:15 +0200
commit221b5d77ef4ce18f1365d05452a110ba71d347b6 (patch)
treed7a041cbb20fa34bd361db318ec79cb08ab649cf
parent4c355d4e81ac009abcfb94df4285d48c5229f958 (diff)
parentfaeca0008bd4ef90b1c9b41171d47b7892deac5e (diff)
downloadmariadb-git-221b5d77ef4ce18f1365d05452a110ba71d347b6.tar.gz
Merge 10.11 into 11.0
-rw-r--r--scripts/mysql_install_db.sh17
-rw-r--r--storage/innobase/buf/buf0flu.cc1
2 files changed, 12 insertions, 6 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 5fc60567e11..eec985396c4 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=""
@@ -557,12 +556,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
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index 569096377c0..0072d0c22b8 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -2419,7 +2419,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. */