You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +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:
@@ -1,3 +1,5 @@
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/install_mcs_mysql.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/install_mcs_mysql.sh" @ONLY)
|
||||
|
||||
|
||||
include_directories( ${ENGINE_COMMON_INCLUDES}
|
||||
/usr/include/libxml2 )
|
||||
@@ -28,7 +30,7 @@ set_source_files_properties(ha_mcs.cpp PROPERTIES COMPILE_FLAGS "-fno-implicit-t
|
||||
|
||||
add_library(calmysql SHARED ${libcalmysql_SRCS})
|
||||
|
||||
target_link_libraries(calmysql ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${NETSNMP_LIBRARIES} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool)
|
||||
target_link_libraries(calmysql ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${NETSNMP_LIBRARIES} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
|
||||
|
||||
set_target_properties(calmysql PROPERTIES VERSION 1.0.0 SOVERSION 1)
|
||||
|
||||
@@ -38,7 +40,7 @@ SET ( is_columnstore_tables_SRCS
|
||||
)
|
||||
add_library(is_columnstore_tables SHARED ${is_columnstore_tables_SRCS})
|
||||
|
||||
target_link_libraries(is_columnstore_tables ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool)
|
||||
target_link_libraries(is_columnstore_tables ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
|
||||
|
||||
# Don't prepend .so file with 'lib'
|
||||
set_target_properties(is_columnstore_tables PROPERTIES PREFIX "")
|
||||
@@ -50,7 +52,7 @@ SET ( is_columnstore_columns_SRCS
|
||||
)
|
||||
add_library(is_columnstore_columns SHARED ${is_columnstore_columns_SRCS})
|
||||
|
||||
target_link_libraries(is_columnstore_columns ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool)
|
||||
target_link_libraries(is_columnstore_columns ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
|
||||
|
||||
# Don't prepend .so file with 'lib'
|
||||
set_target_properties(is_columnstore_columns PROPERTIES PREFIX "")
|
||||
@@ -62,7 +64,7 @@ SET ( is_columnstore_extents_SRCS
|
||||
)
|
||||
add_library(is_columnstore_extents SHARED ${is_columnstore_extents_SRCS})
|
||||
|
||||
target_link_libraries(is_columnstore_extents ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool)
|
||||
target_link_libraries(is_columnstore_extents ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
|
||||
|
||||
# Don't prepend .so file with 'lib'
|
||||
set_target_properties(is_columnstore_extents PROPERTIES PREFIX "")
|
||||
@@ -74,7 +76,7 @@ SET ( is_columnstore_files_SRCS
|
||||
)
|
||||
add_library(is_columnstore_files SHARED ${is_columnstore_files_SRCS})
|
||||
|
||||
target_link_libraries(is_columnstore_files ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool)
|
||||
target_link_libraries(is_columnstore_files ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
|
||||
|
||||
# Don't prepend .so file with 'lib'
|
||||
set_target_properties(is_columnstore_files PROPERTIES PREFIX "")
|
||||
@@ -88,12 +90,12 @@ install(FILES syscatalog_mysql.sql
|
||||
calremoveuserpriority.sql
|
||||
calshowprocesslist.sql
|
||||
columnstore_info.sql
|
||||
DESTINATION ${ENGINE_MYSQLDIR} COMPONENT storage-engine)
|
||||
DESTINATION ${ENGINE_SUPPORTDIR} COMPONENT storage-engine)
|
||||
install(PROGRAMS install_mcs_mysql.sh mysql-Columnstore
|
||||
DESTINATION ${ENGINE_MYSQLDIR} COMPONENT storage-engine)
|
||||
DESTINATION ${ENGINE_SBINDIR} COMPONENT storage-engine)
|
||||
|
||||
install(FILES columnstore.cnf
|
||||
DESTINATION /etc/my.cnf.d COMPONENT storage-engine)
|
||||
DESTINATION ${MARIADB_MYCNFDIR} COMPONENT storage-engine)
|
||||
|
||||
|
||||
#AM_CPPFLAGS = $(idb_common_includes) $(idb_cppflags)
|
||||
|
@@ -3209,7 +3209,7 @@ void ha_mcs_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
||||
//cout << "current set up is usecpimport:delimiter = " << (int)ci->useCpimport<<":"<< ci->delimiter <<endl;
|
||||
//set up for cpimport
|
||||
std::vector<char*> Cmds;
|
||||
std::string aCmdLine(startup::StartUp::installDir());
|
||||
std::string aCmdLine;
|
||||
std::string aTmpDir(startup::StartUp::tmpDir());
|
||||
|
||||
//If local module type is not PM and Local PM query is set, error out
|
||||
@@ -3234,18 +3234,18 @@ void ha_mcs_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
||||
else
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
aCmdLine = aCmdLine + "/bin/cpimport.exe -N -P " + to_string(localModuleId) + " -s " + ci->delimiter + " -e 0" + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
aCmdLine = "cpimport.exe -N -P " + to_string(localModuleId) + " -s " + ci->delimiter + " -e 0" + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
#else
|
||||
aCmdLine = aCmdLine + "/bin/cpimport -m 1 -N -P " + boost::to_string(localModuleId) + " -s " + ci->delimiter + " -e 0" + " -T " + thd->variables.time_zone->get_name()->ptr() + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
aCmdLine = "cpimport -m 1 -N -P " + boost::to_string(localModuleId) + " -s " + ci->delimiter + " -e 0" + " -T " + thd->variables.time_zone->get_name()->ptr() + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
aCmdLine = aCmdLine + "/bin/cpimport.exe -N -s " + ci->delimiter + " -e 0" + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
aCmdLine = "cpimport.exe -N -s " + ci->delimiter + " -e 0" + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
#else
|
||||
aCmdLine = aCmdLine + "/bin/cpimport -m 1 -N -s " + ci->delimiter + " -e 0" + " -T " + thd->variables.time_zone->get_name()->ptr() + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
aCmdLine = std::string("cpimport -m 1 -N -s ") + ci->delimiter + " -e 0" + " -T " + thd->variables.time_zone->get_name()->ptr() + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -3,20 +3,12 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
prefix=/usr/local
|
||||
installdir=$prefix/mariadb/columnstore
|
||||
rpmmode=install
|
||||
pwprompt=" "
|
||||
|
||||
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
|
||||
@@ -116,9 +108,9 @@ CREATE TABLE IF NOT EXISTS infinidb_querystats.priority
|
||||
insert ignore into infinidb_querystats.priority values ('High', 100),('Medium', 66), ('Low', 33);
|
||||
EOD
|
||||
|
||||
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
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/syscatalog_mysql.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/calsetuserpriority.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/calremoveuserpriority.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/calshowprocesslist.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/columnstore_info.sql
|
||||
|
Reference in New Issue
Block a user