Hello Lennart!
I asked core developers to review this and got this reply:
It's probably alright for 10.0. But it's not completely suitable for 10.1.
As contributor mentioned himself that there's a problem with this patch:
"When mysqld is called without mysqld_safe".
I'd rather simplify this script to something like (not tested):
if [ -x /var/run/mysqld/mysqld.pid ]; then
$MYADMIN flush-logs || exit 1
fi
What do you think?
I know your patch would fix an identified issue, but I am also afraid
of any regressions that might be introduced due to this very central
init file change, so I won't be including your patch just yet.