1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-3606 Make ColumnStore use generic paths

ColumnStore now uses standard bin/lib paths for pretty much everything.
Data path is now hard-coded to /var/lib/columnstore.

This patch also:

* Removes v1 decompression
* Removes a bunch of unneeded files
* Removes COLUMNSTORE_INSTALL_DIR / $INSTALLDIR
* Makes my.cnf.d work for all platforms (MCOL-3558)
* Changes configcpp to use recursive mutex (fixes possible config write deadlock)
* Fixes MCOL-3599 Fix regr functions, The library was installed in the wrong location
* Fixes a bunch of Ubuntu packaging issues
* Changes the binary names of several of the executables so as not to
clash with potential executables from other packages
This commit is contained in:
Andrew Hutchings
2019-11-04 11:06:33 +00:00
parent dea1dec507
commit 8ab9ebb0f4
178 changed files with 1310 additions and 18366 deletions

View File

@ -11,7 +11,7 @@ checkForError() {
if [ `cat ${tmpdir}/error.check | wc -c` -ne 0 ]; then
echo "MySQL Password file missing or incorrect, check .my.cnf file"
rm -f ${tmpdir}/error.check
$installdir/mysql/mysql-Columnstore stop
mysql-Columnstore stop
sleep 2
exit 2;
fi
@ -40,20 +40,12 @@ checkForError() {
return 0;
}
prefix=/usr/local
installdir=$prefix/mariadb/columnstore
rpmmode=install
tmpdir="/tmp"
for arg in "$@"; do
if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then
prefix="$(echo $arg | awk -F= '{print $2}')"
installdir=$prefix/mariadb/columnstore
elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then
if [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then
rpmmode="$(echo $arg | awk -F= '{print $2}')"
elif [ $(expr -- "$arg" : '--installdir=') -eq 13 ]; then
installdir="$(echo $arg | awk -F= '{print $2}')"
prefix=$(dirname $installdir)
elif [ $(expr -- "$arg" : '--tmpdir=') -eq 9 ]; then
tmpdir="$(echo $arg | awk -F= '{print $2}')"
else
@ -61,39 +53,26 @@ for arg in "$@"; do
fi
done
USER=`whoami 2>/dev/null`
if [ $USER != "root" ]; then
ldconfig >/dev/null 2>&1
export COLUMNSTORE_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib
else
ldconfig
fi
if [ $installdir != "/usr/local/mariadb/columnstore" ]; then
sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g /etc/my.cnf.d/columnstore.cnf
fi
if [ -x $installdir/mysql/mysql-Columnstore ]; then
if [ -x mysql-Columnstore ]; then
# Restart in the same way that mysqld will be started normally.
$installdir/mysql/mysql-Columnstore stop >/dev/null 2>&1
mysql-Columnstore stop >/dev/null 2>&1
sleep 2
$installdir/mysql/mysql-Columnstore start --skip-grant-tables
mysql-Columnstore start --skip-grant-tables
sleep 5
# Install various Calpont stuff...
$installdir/mysql/install_mcs_mysql.sh --installdir=$installdir --tmpdir=$tmpdir
install_mcs_mysql.sh --tmpdir=$tmpdir
checkForError
if [ $? -ne 0 ]; then
echo "ERROR: Invalid password in .my.cnf, or Columnstore plugin install missing"
$installdir/mysql/mysql-Columnstore stop
mysql-Columnstore stop
sleep 2
exit 2;
fi
$installdir/mysql/mysql-Columnstore stop
mysql-Columnstore stop
fi