Commit 5118c476 authored by Julien Muchembled's avatar Julien Muchembled

ERP5/NEO: fix initialization of mysqld datadir when a plugin option is present

Since 10.4, it seems mysql_install_db does not take anymore
BASEDIR/lib/plugin as default value for plugin_dir.
parent 4cff265a
...@@ -131,14 +131,15 @@ rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/mysqld.in ...@@ -131,14 +131,15 @@ rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/mysqld.in
mode = 644 mode = 644
template = template =
inline:{% raw %}#!/bin/sh -e inline:{% raw %}#!/bin/sh -e
basedir='${mariadb:location}'
datadir='{{datadir}}' datadir='{{datadir}}'
[ -e "$datadir" ] || { [ -e "$datadir" ] || {
rm -vrf "$datadir.new" rm -vrf "$datadir.new"
'${mariadb:location}/scripts/mysql_install_db' \ "$basedir/scripts/mysql_install_db" \
--defaults-file='{{defaults_file}}' \ --defaults-file='{{defaults_file}}' \
--skip-name-resolve \ --skip-name-resolve \
--auth-root-authentication-method=normal \ --auth-root-authentication-method=normal \
--basedir='${mariadb:location}' \ --basedir="$basedir" --plugin_dir="$basedir/lib/plugin" \
--datadir="$datadir.new" --datadir="$datadir.new"
mv -v "$datadir.new" "$datadir" mv -v "$datadir.new" "$datadir"
} }
...@@ -147,9 +148,7 @@ template = ...@@ -147,9 +148,7 @@ template =
{{ variable }} \ {{ variable }} \
{%- endfor %} {%- endfor %}
{%- endif %} {%- endif %}
exec '${mariadb:location}/bin/mysqld' \ exec "$basedir/bin/mysqld" --defaults-file='{{defaults_file}}' "$@"
--defaults-file='{{defaults_file}}' \
"$@"
{% endraw %} {% endraw %}
[versions] [versions]
......
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