You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
MCOL-3551 Use generic MariaDB Server paths
This branch enforces the use of generic MariaDB server paths for their binaries and data rather than custom paths. /usr/local/mariadb/columnstore is now only for columnstore with this patch. It should be noted that this removes the auto-mounting of external MariaDB UM data storage for AWS. This is also a fix for MCOL-3510 after buildbot changes are made. Also... MCOL-3552 Use columnstore.cnf to load plugins The ColumnStore plugins now load using a columnstore.cnf instead of a SQL sequence to be more in-line with MariaDB's methods.
This commit is contained in:
@@ -81,7 +81,7 @@ set_target_properties(is_columnstore_files PROPERTIES PREFIX "")
|
||||
set_target_properties(is_columnstore_files PROPERTIES VERSION 1.0.0 SOVERSION 1)
|
||||
|
||||
|
||||
install(TARGETS calmysql is_columnstore_tables is_columnstore_columns is_columnstore_extents is_columnstore_files DESTINATION ${ENGINE_LIBDIR} COMPONENT storage-engine)
|
||||
install(TARGETS calmysql is_columnstore_tables is_columnstore_columns is_columnstore_extents is_columnstore_files DESTINATION ${MARIADB_PLUGINDIR} COMPONENT storage-engine)
|
||||
install(FILES syscatalog_mysql.sql
|
||||
dumpcat_mysql.sql
|
||||
calsetuserpriority.sql
|
||||
|
@@ -1,14 +1,11 @@
|
||||
# The following options will be passed to all MySQL clients
|
||||
[client]
|
||||
#password = your_password
|
||||
socket = /usr/local/mariadb/columnstore/mysql/lib/mysql/mysql.sock
|
||||
|
||||
# Here follows entries for some specific programs
|
||||
|
||||
# The MySQL server
|
||||
[mysqld]
|
||||
socket = /usr/local/mariadb/columnstore/mysql/lib/mysql/mysql.sock
|
||||
datadir = /usr/local/mariadb/columnstore/mysql/db
|
||||
sql_mode="ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
|
||||
#columnstore_processing_handlers_fallback = OFF;
|
||||
|
||||
@@ -29,15 +26,9 @@ sql_mode="ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
|
||||
#columnstore_use_import_for_batchinsert=1
|
||||
#columnstore_import_for_batchinsert_delimiter=7
|
||||
|
||||
basedir = /usr/local/mariadb/columnstore/mysql/
|
||||
character-sets-dir = /usr/local/mariadb/columnstore/mysql/share/charsets/
|
||||
lc-messages-dir = /usr/local/mariadb/columnstore/mysql/share/
|
||||
plugin_dir = /usr/local/mariadb/columnstore/mysql/lib/plugin
|
||||
|
||||
# Replication Master Server (default)
|
||||
# binary logging is required for replication
|
||||
# log-bin=mysql-bin
|
||||
binlog_format=ROW
|
||||
|
||||
# required unique id between 1 and 2^32 - 1
|
||||
# defaults to 1 if master-host
|
||||
@@ -45,9 +36,11 @@ binlog_format=ROW
|
||||
server-id = 1
|
||||
|
||||
# binary logging - not required for slaves, but recommended
|
||||
log-bin=/usr/local/mariadb/columnstore/mysql/db/mysql-bin
|
||||
relay-log=/usr/local/mariadb/columnstore/mysql/db/relay-bin
|
||||
relay-log-index = /usr/local/mariadb/columnstore/mysql/db/relay-bin.index
|
||||
relay-log-info-file = /usr/local/mariadb/columnstore/mysql/db/relay-bin.info
|
||||
|
||||
lower_case_table_names=1
|
||||
|
||||
plugin-load-add=libcalmysql.so
|
||||
plugin-load-add=is_columnstore_tables.so
|
||||
plugin-load-add=is_columnstore_columns.so
|
||||
plugin-load-add=is_columnstore_extents.so
|
||||
plugin-load-add=is_columnstore_files.so
|
||||
|
@@ -24,15 +24,55 @@ for arg in "$@"; do
|
||||
fi
|
||||
done
|
||||
|
||||
$installdir/mysql/bin/mysql --force --user=root mysql 2> ${tmpdir}/mysql_install.log <<EOD
|
||||
INSTALL PLUGIN columnstore SONAME 'libcalmysql.so';
|
||||
INSTALL PLUGIN columnstore_tables SONAME 'is_columnstore_tables.so';
|
||||
INSTALL PLUGIN columnstore_columns SONAME 'is_columnstore_columns.so';
|
||||
INSTALL PLUGIN columnstore_extents SONAME 'is_columnstore_extents.so';
|
||||
INSTALL PLUGIN columnstore_files SONAME 'is_columnstore_files.so';
|
||||
INSERT INTO mysql.func VALUES ('calgetstats',0,'libcalmysql.so','function'),('calsettrace',2,'libcalmysql.so','function'),('calsetparms',0,'libcalmysql.so','function'),('calflushcache',2,'libcalmysql.so','function'),('calgettrace',0,'libcalmysql.so','function'),('calgetversion',0,'libcalmysql.so','function'),('calonlinealter',2,'libcalmysql.so','function'),('calviewtablelock',0,'libcalmysql.so','function'),('calcleartablelock',0,'libcalmysql.so','function'),('callastinsertid',2,'libcalmysql.so','function'),('calgetsqlcount',0,'libcalmysql.so','function'),('idbpm',2,'libcalmysql.so','function'),('idbdbroot',2,'libcalmysql.so','function'),('idbsegment',2,'libcalmysql.so','function'),('idbsegmentdir',2,'libcalmysql.so','function'),('idbextentrelativerid',2,'libcalmysql.so','function'),('idbblockid',2,'libcalmysql.so','function'),('idbextentid',2,'libcalmysql.so','function'),('idbextentmin',0,'libcalmysql.so','function'),('idbextentmax',0,'libcalmysql.so','function'),('idbpartition',0,'libcalmysql.so','function'),('idblocalpm',2,'libcalmysql.so','function'),('mcssystemready',2,'libcalmysql.so','function'),('mcssystemreadonly',2,'libcalmysql.so','function'),('mcssystemprimary',2,'libcalmysql.so','function'),('regr_avgx',1,'libregr_mysql.so','aggregate'),('regr_avgy',1,'libregr_mysql.so','aggregate'),('regr_count',2,'libregr_mysql.so','aggregate'),('regr_slope',1,'libregr_mysql.so','aggregate'),('regr_intercept',1,'libregr_mysql.so','aggregate'),('regr_r2',1,'libregr_mysql.so','aggregate'),('corr',1,'libregr_mysql.so','aggregate'),('regr_sxx',1,'libregr_mysql.so','aggregate'),('regr_syy',1,'libregr_mysql.so','aggregate'),('regr_sxy',1,'libregr_mysql.so','aggregate'),('covar_pop',1,'libregr_mysql.so','aggregate'),('covar_samp',1,'libregr_mysql.so','aggregate'),('moda',4,'libregr_mysql.so','aggregate'),('distinct_count',2,'libudf_mysql.so','aggregate'),('caldisablepartitions',0,'libcalmysql.so','function'),('calenablepartitions',0,'libcalmysql.so','function'),('caldroppartitions',0,'libcalmysql.so','function'),('calshowpartitions',0,'libcalmysql.so','function'),('caldroppartitionsbyvalue',0,'libcalmysql.so','function'),('caldisablepartitionsbyvalue',0,'libcalmysql.so','function'),('calenablepartitionsbyvalue',0,'libcalmysql.so','function'),('calshowpartitionsbyvalue',0,'libcalmysql.so','function');
|
||||
mysql --force --user=root mysql 2> ${tmpdir}/mysql_install.log <<EOD
|
||||
INSERT INTO mysql.func VALUES ('calgetstats',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calsettrace',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calsetparms',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calflushcache',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calgettrace',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calgetversion',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calonlinealter',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calviewtablelock',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calcleartablelock',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('callastinsertid',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calgetsqlcount',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('idbpm',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('idbdbroot',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('idbsegment',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('idbsegmentdir',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('idbextentrelativerid',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('idbblockid',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('idbextentid',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('idbextentmin',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('idbextentmax',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('idbpartition',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('idblocalpm',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('mcssystemready',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('mcssystemreadonly',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('mcssystemprimary',2,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('regr_avgx',1,'libregr_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('regr_avgy',1,'libregr_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('regr_count',2,'libregr_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('regr_slope',1,'libregr_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('regr_intercept',1,'libregr_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('regr_r2',1,'libregr_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('corr',1,'libregr_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('regr_sxx',1,'libregr_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('regr_syy',1,'libregr_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('regr_sxy',1,'libregr_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('covar_pop',1,'libregr_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('covar_samp',1,'libregr_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('distinct_count',2,'libudf_mysql.so','aggregate');
|
||||
INSERT INTO mysql.func VALUES ('caldisablepartitions',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calenablepartitions',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('caldroppartitions',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calshowpartitions',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('caldroppartitionsbyvalue',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('caldisablepartitionsbyvalue',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calenablepartitionsbyvalue',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calshowpartitionsbyvalue',0,'libcalmysql.so','function');
|
||||
INSERT INTO mysql.func VALUES ('moda',4,'libregr_mysql.so','aggregate');
|
||||
|
||||
CREATE DATABASE IF NOT EXISTS infinidb_vtable;
|
||||
CREATE DATABASE IF NOT EXISTS infinidb_querystats;
|
||||
CREATE TABLE IF NOT EXISTS infinidb_querystats.querystats
|
||||
(
|
||||
@@ -76,9 +116,9 @@ CREATE TABLE IF NOT EXISTS infinidb_querystats.priority
|
||||
insert ignore into infinidb_querystats.priority values ('High', 100),('Medium', 66), ('Low', 33);
|
||||
EOD
|
||||
|
||||
$installdir/mysql/bin/mysql --user=root mysql 2>/dev/null <$installdir/mysql/syscatalog_mysql.sql
|
||||
$installdir/mysql/bin/mysql --user=root mysql 2>/dev/null <$installdir/mysql/calsetuserpriority.sql
|
||||
$installdir/mysql/bin/mysql --user=root mysql 2>/dev/null <$installdir/mysql/calremoveuserpriority.sql
|
||||
$installdir/mysql/bin/mysql --user=root mysql 2>/dev/null <$installdir/mysql/calshowprocesslist.sql
|
||||
$installdir/mysql/bin/mysql --user=root mysql 2>/dev/null <$installdir/mysql/columnstore_info.sql
|
||||
mysql --user=root mysql 2>/dev/null <$installdir/mysql/syscatalog_mysql.sql
|
||||
mysql --user=root mysql 2>/dev/null <$installdir/mysql/calsetuserpriority.sql
|
||||
mysql --user=root mysql 2>/dev/null <$installdir/mysql/calremoveuserpriority.sql
|
||||
mysql --user=root mysql 2>/dev/null <$installdir/mysql/calshowprocesslist.sql
|
||||
mysql --user=root mysql 2>/dev/null <$installdir/mysql/columnstore_info.sql
|
||||
|
||||
|
@@ -43,40 +43,12 @@
|
||||
# If you change base dir, you must also change datadir. These may get
|
||||
# overwritten by settings in the MySQL configuration files.
|
||||
|
||||
prefix=/usr/local
|
||||
|
||||
USER=`whoami 2>/dev/null`
|
||||
|
||||
if [ $USER != "root" ]; then
|
||||
prefix=$HOME
|
||||
fi
|
||||
|
||||
if [ $USER != "root" ]; then
|
||||
if [ -f $prefix/.bash_profile ]; then
|
||||
profileFile=$prefix/.bash_profile
|
||||
elif [ -f $prefix/.profile ]; then
|
||||
profileFile=$prefix/.profile
|
||||
else
|
||||
profileFile=$prefix/.bashrc
|
||||
fi
|
||||
|
||||
. $profileFile
|
||||
fi
|
||||
|
||||
# Source function library.
|
||||
if [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
fi
|
||||
|
||||
if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then
|
||||
COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore
|
||||
fi
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
|
||||
basedir=$COLUMNSTORE_INSTALL_DIR/mysql
|
||||
datadir=$basedir/db
|
||||
|
||||
# Default value, in seconds, afterwhich the script should timeout waiting
|
||||
# for server start.
|
||||
# Value here is overriden by value in my.cnf.
|
||||
@@ -86,7 +58,7 @@ service_startup_timeout=90
|
||||
user=`whoami 2>/dev/null`
|
||||
|
||||
# Lock directory
|
||||
lockdir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation LockFileDirectory`
|
||||
lockdir=/var/lock/subsys
|
||||
|
||||
lock_file_path="$lockdir/mysql-Columnstore"
|
||||
|
||||
@@ -96,14 +68,14 @@ lock_file_path="$lockdir/mysql-Columnstore"
|
||||
mysqld_pid_file_path=
|
||||
if test -z "$basedir"
|
||||
then
|
||||
basedir=/usr/local/mariadb/columnstore/mysql
|
||||
bindir=/usr/local/bin
|
||||
basedir=/usr
|
||||
bindir=/usr/bin
|
||||
if test -z "$datadir"
|
||||
then
|
||||
datadir=/var/lib/mysql
|
||||
fi
|
||||
sbindir=/usr/local/sbin
|
||||
bindir=/usr/local/bin
|
||||
sbindir=/usr/bin
|
||||
bindir=/usr/bin
|
||||
else
|
||||
bindir="$basedir/bin"
|
||||
if test -z "$datadir"
|
||||
@@ -295,7 +267,7 @@ wait_for_ready () {
|
||||
i=0
|
||||
while test $i -ne $service_startup_timeout ; do
|
||||
|
||||
if $bindir/mysqladmin ping --socket=$basedir/lib/mysql/mysql.sock >/dev/null 2>&1; then
|
||||
if $bindir/mysqladmin ping >/dev/null 2>&1; then
|
||||
log_success_msg
|
||||
return 0
|
||||
elif kill -0 $! 2>/dev/null ; then
|
||||
@@ -335,7 +307,7 @@ fi
|
||||
kill_by_pid() {
|
||||
# let's see if we can kill the 2 mysql procs by hand
|
||||
# get the our mysql from ps
|
||||
eval $(ps -ef | grep "$COLUMNSTORE_INSTALL_DIR/mysql/bin/mysqld" | grep -v grep | head -1 | awk '{printf "pid=%d\n", $2}')
|
||||
eval $(ps -ef | grep "bin/mysqld" | grep -v grep | head -1 | awk '{printf "pid=%d\n", $2}')
|
||||
|
||||
if [ -n "$pid" ]; then
|
||||
ppid=$(ps -o ppid= -p $pid)
|
||||
@@ -361,7 +333,7 @@ case "$mode" in
|
||||
then
|
||||
# Give extra arguments to mysqld with the my.cnf file. This script
|
||||
# may be overwritten at next upgrade.
|
||||
$bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "--ledir=$bindir" "$@" >/dev/null 2>&1 &
|
||||
$bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "$@" >/dev/null 2>&1 &
|
||||
wait_for_ready; return_value=$?
|
||||
|
||||
# Make lock for RedHat / SuSE
|
||||
|
Reference in New Issue
Block a user