1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Fix my.cnf clash

This patch:

* Moves ColumnStore my.cnf to /etc/my.cnf.d/columnstore.cnf
* Removes unneeded entries from columnstore.cnf
* Removes some things that used my.cnf and are now dead
* Also removes utils/scenarios
* Modifies things that use extra defaults file to use the standard one
* Makes sure that C++11 standard is used for older CMake versions

With this patch we no longer need to set -DINSTALL_SYSCONF2DIR and
-DINSTALL_SYSCONFDIR when building MariaDB server.
This commit is contained in:
Andrew Hutchings
2019-09-04 18:51:02 +01:00
parent 4d2a1594aa
commit 74d68b4db3
434 changed files with 101 additions and 7866 deletions

View File

@ -174,8 +174,8 @@ endif()
INCLUDE(check_compiler_flag)
MY_CHECK_AND_SET_COMPILER_FLAG("-g -O3 -fno-omit-frame-pointer -fno-strict-aliasing -Wall -fno-tree-vectorize -D_GLIBCXX_ASSERTIONS -DDBUG_OFF -DHAVE_CONFIG_H" RELEASE RELWITHDEBINFO MINSIZEREL)
MY_CHECK_AND_SET_COMPILER_FLAG("-ggdb3 -fno-omit-frame-pointer -fno-tree-vectorize -D_GLIBCXX_ASSERTIONS -DSAFE_MUTEX -DSAFEMALLOC -DENABLED_DEBUG_SYNC -O0 -Wall -D_DEBUG -DHAVE_CONFIG_H" DEBUG)
MY_CHECK_AND_SET_COMPILER_FLAG("-g -O3 -std=c++11 -fno-omit-frame-pointer -fno-strict-aliasing -Wall -fno-tree-vectorize -D_GLIBCXX_ASSERTIONS -DDBUG_OFF -DHAVE_CONFIG_H" RELEASE RELWITHDEBINFO MINSIZEREL)
MY_CHECK_AND_SET_COMPILER_FLAG("-ggdb3 -std=c++11 -fno-omit-frame-pointer -fno-tree-vectorize -D_GLIBCXX_ASSERTIONS -DSAFE_MUTEX -DSAFEMALLOC -DENABLED_DEBUG_SYNC -O0 -Wall -D_DEBUG -DHAVE_CONFIG_H" DEBUG)
# enable security hardening features, like most distributions do
# in our benchmarks that costs about ~1% of performance, depending on the load

View File

@ -1,63 +0,0 @@
#!/bin/bash
#
# $Id: bootstrap 1333 2011-01-18 17:25:26Z rdempsey $
#
# This script is responsible for setting up a fresh development tree
# following a git checkout. It copies static files and shared include
# files to the export tree prior to building the software.
mkdir -p export/{include,lib,etc,share,bin,sbin,post}
if [ ! $$ ]; then
exit 1
fi
cp build/gdb export/bin
cp build/libgcc_s.so.1 export/lib
cp build/libstdc++.so.6.0.14 export/lib
cp build/files.lst $HOME/InfiniDB-MySQL/export/.
cp dbcon/mysql/install_calpont_mysql.sh $HOME/InfiniDB-MySQL/export/.
cp dbcon/mysql/my.cnf $HOME/InfiniDB-MySQL/export/.
cp dbcon/mysql/mysql-Calpont $HOME/InfiniDB-MySQL/export/.
cp build/Doxyfile export/etc
if [ ! $$ ]; then
exit 1
fi
cp -p -r utils/net-snmp export/include
if [ `uname -m` == "x86_64" ]; then
cp -p utils/net-snmp-built-libs/lib64/* export/lib
cp -p utils/net-snmp-built-libs/bin64/* export/sbin
else
egrep -qs Constantine /etc/redhat-release
if [ $? -eq 0 ]; then
cp -p utils/net-snmp-built-libs/fc12lib/libnetsnmp*.so.* export/lib
cp -p utils/net-snmp-built-libs/fc12bin/* export/sbin
else
cp -p utils/net-snmp-built-libs/fc6lib/libnetsnmp*.so.* export/lib
cp -p utils/net-snmp-built-libs/fc6bin/* export/sbin
fi
fi
pushd export/lib >/dev/null
for lib in libnetsnmpagent.so libnetsnmphelpers.so libnetsnmpmibs.so libnetsnmp.so libnetsnmptrapd.so; do
rm -f ${lib} ${lib}.5
ln -s ${lib}.5.2.1 ${lib}.5
ln -s ${lib}.5.2.1 ${lib}
done
popd >/dev/null
#./build/genVersion.sh
for x in \
$(find . -name '[mM]akefile' \
| xargs grep -l ^bootstrap: \
| cut -f 2 -d / \
| sort -u)
do
echo bootstrapping $x
make BOOTSTRAP=1 -C $x bootstrap
done

View File

@ -1,47 +0,0 @@
#!/bin/bash
branch=$1
prefix=/usr/local/Calpont
extra_ld_flags="-Wl,-rpath -Wl,$prefix/mysql/lib/mysql -Wl,-rpath -Wl,$prefix/lib"
export LD_LIBRARY_PATH=/usr/local/gcc45/lib64:/usr/local/gmp43/lib:/usr/local/mpfr24/lib:/usr/local/mpc08/lib
export PATH=/usr/local/gcc45/bin:/usr/local/bin:/bin:/usr/bin
export CC=/usr/local/gcc45/bin/gcc
export CXX=/usr/local/gcc45/bin/g++
cd $HOME
updateGenii.pl -b $branch > updateBranch-$branch.log 2>&1
rm -rf mysql-5.1.39
tar -zxf mysql-5.1.39.tar.gz
cd mysql-5.1.39
cp $HOME/$branch/dbcon/mysql/configure.in .
cd sql
cp $HOME/$branch/dbcon/mysql/*.yy .
cp $HOME/$branch/dbcon/mysql/*.h .
cp $HOME/$branch/dbcon/mysql/*.cc .
if [ -f $HOME/$branch/dbcon/mysql/Makefile.am.mysql ]; then
cp $HOME/$branch/dbcon/mysql/Makefile.am.mysql Makefile.am
fi
if [ -f $HOME/$branch/utils/loggingcpp/errorids.h ]; then
cp $HOME/$branch/utils/loggingcpp/errorids.h .
fi
cd ..
for extras in include mysys; do
if [ -d $HOME/$branch/dbcon/mysql/$extras ]; then
cp $HOME/$branch/dbcon/mysql/$extras/*.h $extras
fi
done
autoreconf
./configure --prefix=$prefix/mysql --without-libedit --with-readline \
--with-plugins=csv,heap,myisam,myisammrg,partition --with-mysqld-ldflags="$extra_ld_flags" \
--with-client-ldflags="$extra_ld_flags" --with-extra-charsets=all --with-ssl
(make && make install) > $HOME/make-branch-$branch.log 2>&1
cd $HOME/$branch/dbcon/mysql
cp files.lst $prefix/mysql
cp install_calpont_mysql.sh $prefix/mysql
cp my.cnf $prefix/mysql
cp mysql-Calpont $prefix/mysql

View File

@ -1,47 +0,0 @@
#!/bin/bash
branch=genii
prefix=/usr/local/Calpont
extra_ld_flags="-Wl,-rpath -Wl,$prefix/mysql/lib/mysql -Wl,-rpath -Wl,$prefix/lib"
export LD_LIBRARY_PATH=/usr/local/gcc45/lib64:/usr/local/gmp43/lib:/usr/local/mpfr24/lib:/usr/local/mpc08/lib
export PATH=/usr/local/gcc45/bin:/usr/local/bin:/bin:/usr/bin
export CC=/usr/local/gcc45/bin/gcc
export CXX=/usr/local/gcc45/bin/g++
cd $HOME
updateGenii.pl > updateGenii.log 2>&1
rm -rf mysql-5.1.39
tar -zxf mysql-5.1.39.tar.gz
cd mysql-5.1.39
cp $HOME/$branch/dbcon/mysql/configure.in .
cd sql
cp $HOME/$branch/dbcon/mysql/*.yy .
cp $HOME/$branch/dbcon/mysql/*.h .
cp $HOME/$branch/dbcon/mysql/*.cc .
if [ -f $HOME/$branch/dbcon/mysql/Makefile.am.mysql ]; then
cp $HOME/$branch/dbcon/mysql/Makefile.am.mysql Makefile.am
fi
if [ -f $HOME/$branch/utils/loggingcpp/errorids.h ]; then
cp $HOME/$branch/utils/loggingcpp/errorids.h .
fi
cd ..
for extras in include mysys; do
if [ -d $HOME/$branch/dbcon/mysql/$extras ]; then
cp $HOME/$branch/dbcon/mysql/$extras/*.h $extras
fi
done
autoreconf
./configure --prefix=$prefix/mysql --without-libedit --with-readline \
--with-plugins=csv,heap,myisam,myisammrg,partition --with-mysqld-ldflags="$extra_ld_flags" \
--with-client-ldflags="$extra_ld_flags" --with-extra-charsets=all --with-ssl
(make && make install) > $HOME/make-$branch.log 2>&1
cd $HOME/$branch/dbcon/mysql
cp files.lst $prefix/mysql
cp install_calpont_mysql.sh $prefix/mysql
cp my.cnf $prefix/mysql
cp mysql-Calpont $prefix/mysql

View File

@ -1,49 +0,0 @@
#!/bin/bash
prefix=/usr/local
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
else
echo "ignoring unknown argument: $arg" 1>&2
fi
done
client="${prefix}/Calpont/mysql/bin/mysql --defaults-file=${prefix}/Calpont/mysql/my.cnf --user=root"
echo "
create database calpont;
use calpont;
create table caltest (col1 int, col2 int) engine=infinidb;
show create table caltest;
" > /tmp/minitest.$$
${client} < /tmp/minitest.$$ > /tmp/minitest.out.$$ 2>&1
if [ $? -ne 0 ]; then
echo "test failed!" 1>&2
exit 1
fi
egrep -qsi 'engine=infinidb' /tmp/minitest.out.$$
if [ $? -ne 0 ]; then
cat /tmp/minitest.out.$$
echo "test failed!" 1>&2
exit 1
fi
echo "
use calpont;
set autocommit=0;
insert into caltest values (1, 2);
insert into caltest values (3, 4);
commit;
select * from caltest;
" > /tmp/minitest.$$
${client} < /tmp/minitest.$$
rc=$?
rm -f /tmp/*.$$
exit $rc

View File

@ -1,103 +0,0 @@
#!/bin/bash
prefix=/usr/local
builddir=
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--builddir='` -eq 11 ]; then
builddir="`echo $arg | awk -F= '{print $2}'`"
else
echo "ignoring unknown argument: $arg" 1>&2
fi
done
if [ -z "$builddir" ]; then
echo "I really need a builddir to continue!" 1>&2
exit 1
fi
if [ ! -d ${builddir}/export/Calpont ]; then
echo "I did't find a Calpont dir in ${builddir}/export!" 1>&2
exit 1
fi
# stop any current procs
${prefix}/Calpont/bin/mcsadmin shutdownsystem y
if [ -x ${prefix}/Calpont/bin/infinidb ]; then
${prefix}/Calpont/bin/infinidb stop
fi
# really stop current procs
sleep 5
for proc in DMLProc DDLProc ExeMgr PrimProc controllernode workernode; do
pkill -9 $proc
sleep 1
done
if [ -x ${prefix}/Calpont/mysql/mysql-Calpont ]; then
${prefix}/Calpont/mysql/mysql-Calpont stop
fi
# cleanup
# remove shm segs
if [ -x ${prefix}/Calpont/bin/clearShm ]; then
${prefix}/Calpont/bin/clearShm stop
fi
# remove Calpont dir
/usr/local/bin/rootStuff
rm -rf ${prefix}/Calpont 2>/dev/null
/usr/local/bin/rootStuff
# (we'll leave the logging stuff in place for now)
# install the binaries
tar -C ${builddir}/export -cf - Calpont | tar -C ${prefix} -xf -
if [ $? -ne 0 ]; then
echo "There was a problem installing the binaries!" 1>&2
exit 1
fi
#chown -R root.root ${prefix}/Calpont
find ${prefix}/Calpont -type d | xargs chmod +rx
find ${prefix}/Calpont -type f | xargs chmod +r
mkdir -p ${prefix}/Calpont/data1/systemFiles/dbrm
if [ ! -f ${prefix}/Calpont/etc/Columnstore.xml.rpmsave ]; then
cp ${prefix}/Calpont/etc/Columnstore.xml.singleserver ${prefix}/Calpont/etc/Columnstore.xml.rpmsave
fi
if [ ! -f ${prefix}/Calpont/mysql/my.cnf ]; then
cp ${builddir}/dbcon/mysql/my.cnf ${prefix}/Calpont/mysql
fi
#fix the port numbers
sed -i -e 's/port.*=.*3306/port=14406/' ${prefix}/Calpont/mysql/my.cnf
# configure the s/w
${prefix}/Calpont/bin/postConfigure -n
# restart (argh)
#${prefix}/Calpont/bin/mcsadmin RestartSystem y
sleep 30
pkill DMLProc
sleep 30
# perform the tests
if [ ! -x ${builddir}/build/mini-tests.sh ]; then
echo "There was a problem trying to start testing the s/w!" 1>&2
exit 1
fi
${builddir}/build/mini-tests.sh --prefix=${prefix}
if [ $? -ne 0 ]; then
echo "There were problems running the tests!" 1>&2
exit 1
fi
# stop the system
${prefix}/Calpont/bin/infinidb stop
${prefix}/Calpont/mysql/mysql-Calpont stop
exit 0

View File

@ -1,137 +0,0 @@
#!/bin/bash
# Copyright (C) 2014 InfiniDB, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2 of
# the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
prefix=/usr/local
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
else
echo "ignoring unknown argument: $arg" 1>&2
fi
done
if [ ! -d build ]; then
echo "No build directory found, giving up. (maybe you're not in the right directory?)" 1>&2
exit 1
fi
bison --version >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "No 'bison' program installed, giving up." 1>&2
exit 1
fi
flex --version >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "No 'flex' program installed, giving up." 1>&2
exit 1
fi
autoreconf --version >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "No 'autoreconf' program installed, giving up." 1>&2
exit 1
fi
expect -v >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "No 'expect' program installed, giving up." 1>&2
exit 1
fi
mysqldir=
for testdir in ./mysql ./mysql-master ../mysql ../mysql-master; do
if [ -d $testdir ]; then
mysqldir=$testdir
break
fi
done
if [ -z "$mysqldir" ]; then
echo "Didn't find a MySQL tree, looking for a ZIP file..."
for testfile in ./mysql-master.zip ../mysql-master.zip; do
if [ -f $testfile ]; then
unzip -qq $testfile
break
fi
done
for testdir in ./mysql ./mysql-master; do
if [ -d $testdir ]; then
mysqldir=$testdir
break
fi
done
fi
if [ -z "$mysqldir" ]; then
echo "Didn't find a MySQL tree and didn't find a ZIP file. Going to github..."
git --version >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "No 'git' program installed, giving up (maybe you could download infinidb-mysql?)." 1>&2
exit 1
fi
git clone https://github.com/infinidb/mysql --branch=master --quiet
if [ $? -ne 0 ]; then
echo "Cloning from github didn't work, giving up." 1>&2
exit 1
fi
if [ ! -x ./mysql/idbbuild.sh ]; then
echo "Didn't find mysql build script, giving up." 1>&2
exit 1
fi
mysqldir=./mysql
fi
echo "Using MySQL tree in $mysqldir"
echo "Building MySQL..."
( cd $mysqldir;
./idbbuild.sh --prefix=$prefix/Calpont && make install ) >./mysql_build.log 2>&1
if [ $? -ne 0 -o ! -x $prefix/Calpont/mysql/libexec/mysqld ]; then
echo "Something went wrong building MySQL, giving up. (check ./mysql_build.log)" 1>&2
exit 1
fi
if [ $mysqldir = "./mysql" -o $mysqldir = "./mysql-master" ]; then
( bn=$(basename $(pwd)); cd ..; ln -s $bn/$mysqldir mysql ) >/dev/null 2>&1
fi
if [ ! -f ../mysql/include/mysql_version.h ]; then
echo "Couldn't find mysql_version.h in ../mysql/include, giving up." 1>&2
exit 1
fi
echo "Building InfiniDB..."
( cp -r utils/autoconf/* .;
autoreconf;
libtoolize --force --install;
mv -f $mysqldir/Makefile $mysqldir/Makefile.bak;
./configure --prefix=$prefix && make && make install ) >./infinidb_build.log 2>&1
if [ $? -ne 0 -o ! -x $prefix/Calpont/bin/PrimProc ]; then
echo "Something went wrong building InfiniDB, giving up. (check ./infinidb_build.log)" 1>&2
exit 1
fi
cp dbcon/mysql/my.cnf $prefix/Calpont/mysql
echo "InfiniDB binaries and libs are in $prefix/Calpont"
exit 0

View File

@ -1,199 +0,0 @@
#!/usr/bin/perl -w
# $Id: fdtests.pl 5967 2009-10-21 14:56:59Z rdempsey $
#
use DBI;
use DBD::mysql;
$databasename='calpont';
$cnffile='/usr/local/mariadb/columnstore/mysql/my.cnf';
$data_source = 'DBI:mysql:database=' . $databasename . ':mysql_read_default_file=' . $cnffile . '';
$username = 'root';
$auth = '';
%attr = ();
$dbh = DBI->connect($data_source, $username, $auth, \%attr);
sub create_table
{
my ($dbh, $tn) = @_;
my $stmt = "create table " . $tn . " (col1 float, col2 double) engine=infinidb;";
$dbh->do($stmt);
}
sub drop_table
{
my ($dbh, $tn) = @_;
my $stmt = "drop table " . $tn . ";";
$dbh->do($stmt);
}
sub insert_rows
{
my ($dbh, $tn) = @_;
my $stmt;
$dbh->do("set autocommit=off;");
$stmt = "insert into " . $tn . " values (4.04e20, 4.04e250);"; $dbh->do($stmt);
$stmt = "insert into " . $tn . " values (3.03, 3.03);"; $dbh->do($stmt);
$stmt = "insert into " . $tn . " values (2.02, 2.02);"; $dbh->do($stmt);
$stmt = "insert into " . $tn . " values (1.01, 1.01);"; $dbh->do($stmt);
$stmt = "insert into " . $tn . " values (0, 0);"; $dbh->do($stmt);
$stmt = "insert into " . $tn . " values (-1.01, -1.01);"; $dbh->do($stmt);
$stmt = "insert into " . $tn . " values (-2.02, -2.02);"; $dbh->do($stmt);
$stmt = "insert into " . $tn . " values (-3.03, -3.03);"; $dbh->do($stmt);
$stmt = "insert into " . $tn . " values (-4.04e20, -4.04e250);"; $dbh->do($stmt);
$stmt = "insert into " . $tn . " values (null, null);"; $dbh->do($stmt);
$stmt = "insert into " . $tn . " values (3.14159265358979323846, 3.14159265358979323846);"; $dbh->do($stmt);
$dbh->do("commit;");
$dbh->do("set autocommit=on;");
}
sub run_tests
{
my ($dbh, $tn) = @_;
my $stmt;
my @row_ary;
my $cnt;
$stmt = "select count(*) from " . $tn . ";";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 11);
$stmt = "select count(*) from " . $tn . " where col1 < 4.05e20;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 10);
$stmt = "select count(*) from " . $tn . " where col1 < 0.99;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 5);
$stmt = "select count(*) from " . $tn . " where col1 < -2.03;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 2);
$stmt = "select count(*) from " . $tn . " where col1 < -4.05e20;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 0);
$stmt = "select count(*) from " . $tn . " where col1 between 0 - 0.0005 and 0 + 0.0005;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col2 < 4.05e250;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 10);
$stmt = "select count(*) from " . $tn . " where col2 < 0.99;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 5);
$stmt = "select count(*) from " . $tn . " where col2 < -2.03;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 2);
$stmt = "select count(*) from " . $tn . " where col2 < -4.05e250;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 0);
$stmt = "select count(*) from " . $tn . " where col2 between 0 - 0.0005 and 0 + 0.0005;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col1 between 3.14159 - 0.00001 and 3.14159 + 0.00001 ;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col2 between " .
"3.14159265358979 - 0.00000000000001 and 3.14159265358979 + 0.00000000000001;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select sum(col1) from " . $tn . ";";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt < 3.14159 - 0.00001 || $cnt > 3.14159 + 0.00001);
$stmt = "select min(col1) from " . $tn . ";";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt < -4.04e20 - 0.01e20 || $cnt > -4.04e20 + 0.01e20);
$stmt = "select max(col1) from " . $tn . ";";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt < 4.04e20 - 0.01e20 || $cnt > 4.04e20 + 0.01e20);
$stmt = "select avg(col1) from " . $tn . ";";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt < 0.314159 - 0.000001 || $cnt > 0.314159 + 0.000001);
$stmt = "select sum(col2) from " . $tn . ";";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt < 3.14159 - 0.00001 || $cnt > 3.14159 + 0.00001);
$stmt = "select min(col2) from " . $tn . ";";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt < -4.04e250 - 0.01e250 || $cnt > -4.04e250 + 0.01e250);
$stmt = "select max(col2) from " . $tn . ";";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt < 4.04e250 - 0.01e250 || $cnt > 4.04e250 + 0.01e250);
$stmt = "select avg(col2) from " . $tn . ";";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt < 0.314159 - 0.000001 || $cnt > 0.314159 + 0.000001);
}
create_table($dbh, 'fdtest');
insert_rows($dbh, 'fdtest');
run_tests($dbh, 'fdtest');
drop_table($dbh, 'fdtest');
$dbh->disconnect;

View File

@ -1,476 +0,0 @@
#! /usr/bin/perl -w
#
# $Id: nulltests.pl 5967 2009-10-21 14:56:59Z rdempsey $
use DBI;
use DBD::mysql;
$| = 1;
$database='rjd';
$cfgfile='/home/rdempsey/mysql/etc/my.cnf';
$data_source = 'DBI:mysql:database=' . $database . ':mysql_read_default_file=' . $cfgfile . '';
$username = 'root';
$auth = '';
%attr = ();
$dbh = DBI->connect($data_source, $username, $auth, \%attr);
sub create_table
{
my ($dbh, $tn, $colttype) = @_;
my $stmt = "create table " . $tn . " (col1 " . $colttype . ") engine=infinidb;";
$dbh->do($stmt);
}
sub drop_table
{
my ($dbh, $tn) = @_;
my $stmt = "drop table " . $tn . ";";
$dbh->do($stmt);
}
sub insert_int_rows
{
my ($dbh, $tn) = @_;
my $stmt = "insert into " . $tn . " values (null);";
$dbh->do($stmt);
$stmt = "insert into " . $tn . " values (1);";
$dbh->do($stmt);
}
sub insert_char_rows
{
my ($dbh, $tn) = @_;
my $stmt = "insert into " . $tn . " values (null);";
$dbh->do($stmt);
$stmt = "insert into " . $tn . " values ('');";
$dbh->do($stmt);
$stmt = "insert into " . $tn . " values ('A');";
$dbh->do($stmt);
}
sub insert_date_rows
{
my ($dbh, $tn) = @_;
my $stmt = "insert into " . $tn . " values (null);";
$dbh->do($stmt);
$stmt = "insert into " . $tn . " values ('2008-05-14');";
$dbh->do($stmt);
}
sub check_int_counts
{
my ($dbh, $tn) = @_;
my $stmt = "select count(*) from " . $tn . ";";
my @row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
my $cnt = $row_ary[0];
die if ($cnt != 2);
$stmt = "select count(*) from " . $tn . " where col1 is null;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col1 is not null;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col1 = 1;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col1 <> 1;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 0);
$stmt = "select count(*) from " . $tn . " where col1 < 127;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col1 > -126;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
}
sub check_char_counts
{
my ($dbh, $tn) = @_;
my $stmt = "select count(*) from " . $tn . ";";
my @row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
my $cnt = $row_ary[0];
die if ($cnt != 3);
$stmt = "select count(*) from " . $tn . " where col1 is null;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 2);
$stmt = "select count(*) from " . $tn . " where col1 is not null;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col1 = 'A';";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col1 <> 'A';";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 0);
$stmt = "select count(*) from " . $tn . " where col1 < 'Z';";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col1 > '!';";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
}
sub check_date_counts
{
my ($dbh, $tn) = @_;
my $stmt = "select count(*) from " . $tn . ";";
my @row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
my $cnt = $row_ary[0];
die if ($cnt != 2);
$stmt = "select count(*) from " . $tn . " where col1 is null;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col1 is not null;";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col1 = '2008-05-14';";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col1 <> '2008-05-14';";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 0);
$stmt = "select count(*) from " . $tn . " where col1 < '2018-05-14';";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
$stmt = "select count(*) from " . $tn . " where col1 > '1998-05-14';";
@row_ary = $dbh->selectrow_array($stmt);
die if ($#row_ary != 0);
$cnt = $row_ary[0];
die if ($cnt != 1);
}
sub dotinyinttest
{
my ($dbh) = @_;
my $tn = 'tinyinttest';
print "running tinyint tests...";
create_table($dbh, $tn, 'tinyint');
insert_int_rows($dbh, $tn);
check_int_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dosmallinttest
{
my ($dbh) = @_;
my $tn = 'smallinttest';
print "running smallint tests...";
create_table($dbh, $tn, 'smallint');
insert_int_rows($dbh, $tn);
check_int_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dointtest
{
my ($dbh) = @_;
my $tn = 'inttest';
print "running int tests...";
create_table($dbh, $tn, 'int');
insert_int_rows($dbh, $tn);
check_int_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dobiginttest
{
my ($dbh) = @_;
my $tn = 'biginttest';
print "running bigint tests...";
create_table($dbh, $tn, 'bigint');
insert_int_rows($dbh, $tn);
check_int_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dochar1test
{
my ($dbh) = @_;
my $tn = 'char1test';
print "running char1 tests...";
create_table($dbh, $tn, 'char(1)');
insert_char_rows($dbh, $tn);
check_char_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dochar2test
{
my ($dbh) = @_;
my $tn = 'char2test';
print "running char2 tests...";
create_table($dbh, $tn, 'char(2)');
insert_char_rows($dbh, $tn);
check_char_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dochar4test
{
my ($dbh) = @_;
my $tn = 'char4test';
print "running char4 tests...";
create_table($dbh, $tn, 'char(4)');
insert_char_rows($dbh, $tn);
check_char_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dochar8test
{
my ($dbh) = @_;
my $tn = 'char8test';
print "running char8 tests...";
create_table($dbh, $tn, 'char(8)');
insert_char_rows($dbh, $tn);
check_char_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dovarchar1test
{
my ($dbh) = @_;
my $tn = 'varchar1test';
print "running varchar1 tests...";
create_table($dbh, $tn, 'varchar(1)');
insert_char_rows($dbh, $tn);
check_char_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dovarchar3test
{
my ($dbh) = @_;
my $tn = 'varchar3test';
print "running varchar3 tests...";
create_table($dbh, $tn, 'varchar(3)');
insert_char_rows($dbh, $tn);
check_char_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dovarchar7test
{
my ($dbh) = @_;
my $tn = 'varchar7test';
print "running varchar7 tests...";
create_table($dbh, $tn, 'varchar(7)');
insert_char_rows($dbh, $tn);
check_char_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dochar40test
{
my ($dbh) = @_;
my $tn = 'char40test';
print "running char40 tests...";
create_table($dbh, $tn, 'char(40)');
insert_char_rows($dbh, $tn);
check_char_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dovarchar40test
{
my ($dbh) = @_;
my $tn = 'varchar40test';
print "running varchar40 tests...";
create_table($dbh, $tn, 'varchar(40)');
insert_char_rows($dbh, $tn);
check_char_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dodec4test
{
my ($dbh) = @_;
my $tn = 'dec4test';
print "running decimal4 tests...";
create_table($dbh, $tn, 'decimal(4,2)');
insert_int_rows($dbh, $tn);
check_int_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dodec9test
{
my ($dbh) = @_;
my $tn = 'dec9test';
print "running decimal9 tests...";
create_table($dbh, $tn, 'decimal(9,2)');
insert_int_rows($dbh, $tn);
check_int_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dodec18test
{
my ($dbh) = @_;
my $tn = 'dec18test';
print "running decimal18 tests...";
create_table($dbh, $tn, 'decimal(18,2)');
insert_int_rows($dbh, $tn);
check_int_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dodatetest
{
my ($dbh) = @_;
my $tn = 'datetest';
print "running date tests...";
create_table($dbh, $tn, 'date');
insert_date_rows($dbh, $tn);
check_date_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dodatetimetest
{
my ($dbh) = @_;
my $tn = 'datetimetest';
print "running datetime tests...";
create_table($dbh, $tn, 'datetime');
insert_date_rows($dbh, $tn);
check_date_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dofloattest
{
my ($dbh) = @_;
my $tn = 'floattest';
print "running float tests...";
create_table($dbh, $tn, 'float');
insert_int_rows($dbh, $tn);
check_int_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
sub dodoubletest
{
my ($dbh) = @_;
my $tn = 'doubletest';
print "running double tests...";
create_table($dbh, $tn, 'double');
insert_int_rows($dbh, $tn);
check_int_counts($dbh, $tn);
drop_table($dbh, $tn);
print "done\n";
}
dotinyinttest($dbh);
dosmallinttest($dbh);
dointtest($dbh);
dobiginttest($dbh);
dochar1test($dbh);
dochar2test($dbh);
dochar4test($dbh);
dochar8test($dbh);
dovarchar1test($dbh);
dovarchar3test($dbh);
dovarchar7test($dbh);
dochar40test($dbh);
dovarchar40test($dbh);
dodec4test($dbh);
dodec9test($dbh);
dodec18test($dbh);
#dodec30test($dbh);
dodatetest($dbh);
dodatetimetest($dbh);
dofloattest($dbh);
dodoubletest($dbh);
$dbh->disconnect;

View File

@ -87,11 +87,13 @@ install(FILES syscatalog_mysql.sql
calremoveuserpriority.sql
calshowprocesslist.sql
columnstore_info.sql
my.cnf
DESTINATION ${ENGINE_MYSQLDIR} COMPONENT storage-engine)
install(PROGRAMS install_calpont_mysql.sh mysql-Columnstore
DESTINATION ${ENGINE_MYSQLDIR} COMPONENT storage-engine)
install(FILES columnstore.cnf
DESTINATION /etc/my.cnf.d COMPONENT storage-engine)
#AM_CPPFLAGS = $(idb_common_includes) $(idb_cppflags)
#AM_CFLAGS = $(idb_cflags)

View File

@ -0,0 +1,52 @@
# 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;
# Enable compression by default on create, set to 0 to turn off
#columnstore_compression_type=2
# Default for string table threshhold
#columnstore_stringtable_threshold=20
# infinidb local query flag
#columnstore_local_query=0
#columnstore_diskjoin_smallsidelimit=0
#columnstore_diskjoin_largesidelimit=0
#columnstore_diskjoin_bucketsize=100
#columnstore_um_mem_limit=0
#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
# uses to 2+ if slave-host
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

View File

@ -24,9 +24,7 @@ for arg in "$@"; do
fi
done
df=$installdir/mysql/my.cnf
$installdir/mysql/bin/mysql --defaults-extra-file=$df --force --user=root mysql 2> ${tmpdir}/mysql_install.log <<EOD
$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';
@ -78,9 +76,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 --defaults-extra-file=$df --user=root mysql 2>/dev/null <$installdir/mysql/syscatalog_mysql.sql
$installdir/mysql/bin/mysql --defaults-extra-file=$df --user=root mysql 2>/dev/null <$installdir/mysql/calsetuserpriority.sql
$installdir/mysql/bin/mysql --defaults-extra-file=$df --user=root mysql 2>/dev/null <$installdir/mysql/calremoveuserpriority.sql
$installdir/mysql/bin/mysql --defaults-extra-file=$df --user=root mysql 2>/dev/null <$installdir/mysql/calshowprocesslist.sql
$installdir/mysql/bin/mysql --defaults-extra-file=$df --user=root mysql 2>/dev/null <$installdir/mysql/columnstore_info.sql
$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

View File

@ -1,184 +0,0 @@
#
# $Id: my.cnf 9502 2013-05-09 15:37:30Z pleblanc $
#
# Example MySQL config file for very large systems.
#
# This is for a large system with memory of 1G-2G where the system runs mainly
# MySQL.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /usr/local/mariadb/columnstore/mysql/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /usr/local/mariadb/columnstore/mysql/lib/mysql/mysql.sock
datadir = /usr/local/mariadb/columnstore/mysql/db
skip-external-locking
key_buffer_size = 512M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 4M
read_buffer_size = 4M
read_rnd_buffer_size = 16M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 0
# Try number of CPU's*2 for thread_concurrency
#thread_concurrency = 8
thread_stack = 512K
lower_case_table_names=1
group_concat_max_len=512
sql_mode="ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
#columnstore_processing_handlers_fallback = OFF;
# Enable compression by default on create, set to 0 to turn off
#columnstore_compression_type=2
# Default for string table threshhold
#columnstore_stringtable_threshold=20
# infinidb local query flag
#columnstore_local_query=0
#columnstore_diskjoin_smallsidelimit=0
#columnstore_diskjoin_largesidelimit=0
#columnstore_diskjoin_bucketsize=100
#columnstore_um_mem_limit=0
#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
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
# 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
# uses to 2+ if slave-host
server-id = 1
# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# where you replace <host>, <user>, <password> by quoted strings and
# <port> by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
#
# The replication master for this slave - required
#master-host = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>
#
# 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
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/mariadb/columnstore/mysql/lib/mysql/
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
#innodb_log_group_home_dir = /usr/local/mariadb/columnstore/mysql/lib/mysql/
#innodb_log_arch_dir = /usr/local/mariadb/columnstore/mysql/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 384M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 100M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout

View File

@ -1,237 +0,0 @@
#!/usr/bin/perl -w
#
# $Id: schemaSync.pl 9731 2013-08-01 16:58:35Z rdempsey $
use DBI;
use DBD::mysql;
$| = 1;
$cfgfile='/usr/local/mariadb/columnstore/mysql/my.cnf';
$username = 'root';
$auth = '';
%attr = ();
@calpont_objects = ();
sub gather_calpont_objects
{
$stmt = <<EOD
select
`schema`, tablename, columnname, objectid, dictobjectid, datatype,
scale, prec, columnlength, columnposition, compressiontype
from
syscolumn
order by
`schema`, tablename, columnposition;
EOD
;
my $sth = $dbh->prepare($stmt);
$sth->execute();
my @row_ary = $sth->fetchrow_array();
while ($#row_ary >= 0)
{
push(@calpont_objects, [@row_ary]);
@row_ary = $sth->fetchrow_array();
}
}
sub gather_mysql_objects
{
}
sub diff_calpont_mysql
{
}
sub diff_mysql_calpont
{
}
sub conflicts
{
}
$database='calpontsys';
$data_source = 'DBI:mysql:database=' . $database . ':mysql_read_default_file=' . $cfgfile . '';
$dbh = DBI->connect($data_source, $username, $auth, \%attr);
gather_calpont_objects;
$dbh->disconnect;
sub datatype2name
{
my ($dt) = @_;
if ($dt == 0)
{
$dts = 'bit';
}
elsif ($dt == 1)
{
$dts = 'tinyint';
}
elsif ($dt == 2)
{
$dts = 'char';
}
elsif ($dt == 3)
{
$dts = 'smallint';
}
elsif ($dt == 4)
{
$dts = 'decimal';
}
elsif ($dt == 5)
{
$dts = 'medint';
}
elsif ($dt == 6)
{
$dts = 'int';
}
elsif ($dt == 7)
{
$dts = 'float';
}
elsif ($dt == 8)
{
$dts = 'date';
}
elsif ($dt == 9)
{
$dts = 'bigint';
}
elsif ($dt == 10)
{
$dts = 'double';
}
elsif ($dt == 11)
{
$dts = 'datetime';
}
elsif ($dt == 12)
{
$dts = 'varchar';
}
elsif ($dt == 13)
{
$dts = 'varbinary';
}
elsif ($dt == 14)
{
$dts = 'clob';
}
elsif ($dt == 15)
{
$dts = 'blob';
}
elsif ($dt == 16)
{
$dts = 'tinyint unsigned';
}
elsif ($dt == 17)
{
$dts = 'smallint unsigned';
}
elsif ($dt == 18)
{
$dts = 'decimal unsigned';
}
elsif ($dt == 19)
{
$dts = 'medint unsigned';
}
elsif ($dt == 20)
{
$dts = 'int unsigned';
}
elsif ($dt == 21)
{
$dts = 'float unsigned';
}
elsif ($dt == 22)
{
$dts = 'bigint unsigned';
}
elsif ($dt == 23)
{
$dts = 'double unsigned';
}
else
{
$dts = "$dt";
}
return $dts;
}
%schemas = ();
foreach $co (@calpont_objects)
{
$schema = "$@$co->[0]";
$schemas{$schema} = 1;
}
%schematables = ();
foreach $schema (keys %schemas)
{
foreach $co (@calpont_objects)
{
next if ("$@$co->[0]" ne $schema);
$schematable = $schema . ".$@$co->[1]";
$schematables{$schematable} = 1;
}
}
$curdb='';
foreach $schema (keys %schemas)
{
foreach $schematable (keys %schematables)
{
next if (!($schematable =~ /^$schema\./));
$first = 1;
foreach $co (@calpont_objects)
{
$schtbl = "$@$co->[0].$@$co->[1]";
next if ($schematable ne $schtbl);
$ty = "$@$co->[5]";
$nm = datatype2name($ty);
$sc = "$@$co->[6]";
if (($nm eq 'smallint' || $nm eq 'int' || $nm eq 'bigint') && $sc > 0)
{
$nm = 'decimal';
}
if ($first == 1)
{
if ("$@$co->[0]" ne $curdb)
{
print "create database if not exists $@$co->[0];\nuse $@$co->[0];\n\n";
$curdb = "$@$co->[0]";
}
print "create table if not exists $@$co->[1] (\n";
$first = 0;
}
else
{
print ", ";
}
print "$@$co->[2] $nm";
if ($nm eq 'char' || $nm eq 'varchar' || $nm eq 'varbinary')
{
print "($@$co->[8])";
}
elsif ($nm eq 'decimal')
{
print "($@$co->[7],$@$co->[6])";
}
print " comment 'compression=$@$co->[10]'\n";
}
print ") engine=infinidb comment='schema sync only';\n\n";
}
}
gather_mysql_objects;
diff_calpont_mysql;
diff_mysql_calpont;
conflicts;

View File

@ -1,6 +1,6 @@
# MariaDB Columnstore Alias Commands
#
alias mcsmysql='/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root'
alias mcsmysql='/usr/local/mariadb/columnstore/mysql/bin/mysql -u root'
alias ma=/usr/local/mariadb/columnstore/bin/mcsadmin
alias mcsadmin=/usr/local/mariadb/columnstore/bin/mcsadmin
alias cpimport=/usr/local/mariadb/columnstore/bin/cpimport

View File

@ -57,7 +57,6 @@ EOD
cat${tmpdir}/mariadb-command-line.sql >> ${tmpdir}/mariadb-command-line.log
$installdir/mysql/bin/mysql \
--defaults-extra-file=$installdir/mysql/my.cnf \
--user=root \
calpontsys < ${tmpdir}/mariadb-command-line.sql >> ${tmpdir}/mariadb-command-line.log 2>&1

View File

@ -52,7 +52,6 @@ EOD
cat ${tmpdir}/idb_master-rep.sql >>${tmpdir}/master-rep-status-$hostipaddr.log
$installdir/mysql/bin/mysql \
--defaults-extra-file=$installdir/mysql/my.cnf \
--user=root \
calpontsys <${tmpdir}/idb_master-rep.sql >>${tmpdir}/master-rep-status-$hostipaddr.log 2>&1
@ -70,7 +69,6 @@ EOD
cat ${tmpdir}/idb_master-rep.sql >>${tmpdir}/master-rep-status-$hostipaddr.log
$installdir/mysql/bin/mysql \
--defaults-extra-file=$installdir/mysql/my.cnf \
--user=root \
calpontsys <${tmpdir}/idb_master-rep.sql >>${tmpdir}/master-rep-status-$hostipaddr.log 2>&1
@ -86,7 +84,6 @@ EOD
cat ${tmpdir}/idb_master-rep.sql >>${tmpdir}/master-rep-status-$hostipaddr.log
$installdir/mysql/bin/mysql \
--defaults-extra-file=$installdir/mysql/my.cnf \
--user=root \
calpontsys <${tmpdir}/idb_master-rep.sql >>${tmpdir}/master-rep-status-$hostipaddr.log 2>&1
@ -99,7 +96,6 @@ EOD
cat ${tmpdir}/idb_master-rep.sql >${tmpdir}/show-master-status.log
$installdir/mysql/bin/mysql \
--defaults-extra-file=$installdir/mysql/my.cnf \
--user=root \
calpontsys <${tmpdir}/idb_master-rep.sql >>${tmpdir}/show-master-status.log

View File

@ -139,13 +139,13 @@ fi
MySQLRep=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation MySQLRep`
if [ $MySQLRep = "y" ]; then
if test -f $COLUMNSTORE_INSTALL_DIR/mysql/my.cnf ; then
if test -f /etc/my.cnf.d/columnstore.cnf ; then
echo "Run Upgrade on my.cnf on Module"
$COLUMNSTORE_INSTALL_DIR/bin/mycnfUpgrade > ${tmpDir}/mycnfUpgrade.log 2>&1
fi
fi
if test -f $COLUMNSTORE_INSTALL_DIR/mysql/my.cnf ; then
if test -f /etc//my.cnf.d/columnstore.cnf ; then
mysqlPort=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation MySQLPort`
echo "Run Mysql Port update on my.cnf on Module"
$COLUMNSTORE_INSTALL_DIR/bin/mycnfUpgrade $mysqlPort > ${tmpDir}/mycnfUpgrade_port.log 2>&1

View File

@ -23,7 +23,6 @@ checkForError() {
#---------------------------------------------------------------------------
echo "checking for engine columnstore..."
$installdir/mysql/bin/mysql \
--defaults-extra-file=$installdir/mysql/my.cnf \
--user=root \
--execute='select * from mysql.plugin where name="columnstore";' \
calpontsys | grep -i columnstore
@ -92,7 +91,7 @@ if [ -d $installdir/mysql/lib64/mysql/plugin -a -n "$libcalmysql" ]; then
fi
if [ $installdir != "/usr/local/mariadb/columnstore" ]; then
sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g $installdir/mysql/my.cnf
sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g /etc/my.cnf.d/columnstore.cnf
fi
if [ -x $installdir/mysql/mysql-Columnstore ]; then

View File

@ -71,7 +71,7 @@ chown -R $user:$user $installdir/mysql
# Initiate databases if needed
if [ $installdir != "/usr/local/mariadb/columnstore" ]; then
sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g $installdir/mysql/my.cnf
sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g /etc/my.cnf.d/columnstore.cnf
fi
# InfiniDB testing hook...
@ -92,7 +92,7 @@ if [ -d $installdir/mysql/db/calpontsys ]; then
if [ -x $installdir/mysql/bin/mysql_upgrade ]; then
echo "Running mysql_upgrade script"
if [[ ${password} == " " ]]; then
$installdir/mysql/bin/mysql_upgrade --defaults-file=$installdir/mysql/my.cnf > $tmpdir/mysql_upgrade.log
$installdir/mysql/bin/mysql_upgrade > $tmpdir/mysql_upgrade.log
if [ $? -ne 0 ]; then
echo "ERROR: mysql_upgrade failure, check $tmpdir/mysql_upgrade.log"
$installdir/mysql/mysql-Columnstore stop
@ -100,7 +100,7 @@ if [ -d $installdir/mysql/db/calpontsys ]; then
exit 2;
fi
else
$installdir/mysql/bin/mysql_upgrade --defaults-file=$installdir/mysql/my.cnf --password=$password > $tmpdir/mysql_upgrade.log
$installdir/mysql/bin/mysql_upgrade --password=$password > $tmpdir/mysql_upgrade.log
if [ $? -ne 0 ]; then
echo "ERROR: mysql_upgrade failure, check $tmpdir/mysql_upgrade.log"
$installdir/mysql/mysql-Columnstore stop
@ -117,7 +117,7 @@ if [ -d $installdir/mysql/db/calpontsys ]; then
fi
### Don't give the user the notes, we'll fix them ourselves...
$installdir/mysql/scripts/mysql_install_db --rpm --user=$user --defaults-extra-file=$installdir/mysql/my.cnf --basedir=$installdir/mysql >/dev/null
$installdir/mysql/scripts/mysql_install_db --rpm --user=$user --basedir=$installdir/mysql >/dev/null
# Change permissions again to fix any new files.
chown -R $user:$user $mysql_datadir

View File

@ -57,7 +57,6 @@ EOD
cat ${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-extra-file=$installdir/mysql/my.cnf \
--user=root \
calpontsys <${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log 2>&1
@ -80,7 +79,6 @@ EOD
cat ${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-extra-file=$installdir/mysql/my.cnf \
--user=root \
calpontsys <${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log 2>&1
@ -96,7 +94,6 @@ EOD
cat ${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-extra-file=$installdir/mysql/my.cnf \
--user=root \
calpontsys <${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log 2>&1
@ -112,7 +109,6 @@ EOD
cat ${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-extra-file=$installdir/mysql/my.cnf \
--user=root \
calpontsys <${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log 2>&1

View File

@ -9206,7 +9206,7 @@ int Oam::glusterctl(GLUSTER_COMMANDS command, std::string argument1, std::string
******************************************************************************************/
bool Oam::changeMyCnf( std::string paramater, std::string value )
{
string mycnfFile = startup::StartUp::installDir() + "/mysql/my.cnf";
string mycnfFile = "/etc/my.cnf.d/columnstore.cnf";
ifstream file (mycnfFile.c_str());
if (!file)

View File

@ -10,8 +10,7 @@
if [ -z "$MYSQLCMD" ]; then
INSTALLDIR="/usr/local/mariadb/columnstore"
MYSQLCNF=$INSTALLDIR/mysql/my.cnf
MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-extra-file=$MYSQLCNF -u root"
MYSQLCMD="$INSTALLDIR/mysql/bin/mysql -u root"
fi
#

View File

@ -872,7 +872,7 @@ int main(int argc, char* argv[])
{
// check if mysql is supported and get info
string logFile = tmpDir + "/idbmysql.log";
string columnstoreMysql = installDir + "/mysql/bin/mysql --defaults-extra-file=" + installDir + "/mysql/my.cnf -u root ";
string columnstoreMysql = installDir + "/mysql/bin/mysql -u root ";
string cmd = columnstoreMysql + " -e 'status' > " + logFile + " 2>&1";
system(cmd.c_str());
@ -886,8 +886,8 @@ int main(int argc, char* argv[])
//needs a password, was password entered on command line
if ( mysqlpw == " " )
{
//go check my.cnf
string file = installDir + "/mysql/my.cnf";
//go check columnstore.cnf
string file = "/etc/my.cnf.d/columnstore.cnf";
ifstream oldFile (file.c_str());
vector <string> lines;
@ -909,8 +909,8 @@ int main(int argc, char* argv[])
if (pos == string::npos)
{
//password arg in my.cnf, go get password
cout << "NOTE: Using password from my.cnf" << endl;
//password arg in columnstore.cnf, go get password
cout << "NOTE: Using password from columnstore.cnf" << endl;
mysqlpw = buf.substr(pos1 + 1, 80);
cout << mysqlpw << endl;
break;
@ -923,7 +923,7 @@ int main(int argc, char* argv[])
if ( mysqlpw == " " )
{
cout << "NOTE: No password provide on command line or found uncommented in my.cnf" << endl;
cout << "NOTE: No password provide on command line or found uncommented in columnstore.cnf" << endl;
cout << endl;
string prompt = " *** Enter MariaDB Columnstore password > ";
mysqlpw = getpass(prompt.c_str());
@ -946,7 +946,7 @@ int main(int argc, char* argv[])
if (!FAILED)
{
// check if mysql is supported and get info
string columnstoreMysql = installDir + "/mysql/bin/mysql --defaults-extra-file=" + installDir + "/mysql/my.cnf -u root " + pwprompt;
string columnstoreMysql = installDir + "/mysql/bin/mysql -u root " + pwprompt;
string cmd = columnstoreMysql + " -V > /dev/null 2>&1";
int ret = system(cmd.c_str());
@ -1047,11 +1047,11 @@ int main(int argc, char* argv[])
system("echo ' ' >> columnstoreSupportReport.txt");
system("echo '******************** DBMS Columnstore config file ********************' >> columnstoreSupportReport.txt");
system("echo ' ' >> columnstoreSupportReport.txt");
string cmd = "echo '################# cat /mysql/my.cnf ################# ' >> columnstoreSupportReport.txt";
string cmd = "echo '################# cat /etc/my.cnf.d/columnstore.cnf ################# ' >> columnstoreSupportReport.txt";
system(cmd.c_str());
cmd = "echo ' ' >> columnstoreSupportReport.txt";
system(cmd.c_str());
cmd = "cat " + installDir + "/mysql/my.cnf 2>/dev/null >> columnstoreSupportReport.txt";
cmd = "cat /etc/my.cnf.d/columnstore.cnf 2>/dev/null >> columnstoreSupportReport.txt";
system(cmd.c_str());
system("echo ' ' >> columnstoreSupportReport.txt");

View File

@ -10,8 +10,7 @@
if [ -z "$MYSQLCMD" ]; then
INSTALLDIR="/usr/local/mariadb/columnstore"
MYSQLCNF=$INSTALLDIR/mysql/my.cnf
MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-extra-file=$MYSQLCNF -u root"
MYSQLCMD="$INSTALLDIR/mysql/bin/mysql -u root"
fi
#

View File

@ -45,7 +45,7 @@
#
if [ -z "$MYSQLCMD" ]; then
MYSQLCMD="/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root"
MYSQLCMD="/usr/local/mariadb/columnstore/mysql/bin/mysql -u root"
fi
if [ -z "$INSTALLDIR" ]; then

View File

@ -19,7 +19,7 @@ fi
if [ -z "$MYSQLCMD" ]; then
MYSQLCMD="$COLUMNSTORE_INSTALL_DIR/mysql/bin/mysql --defaults-extra-file=$COLUMNSTORE_INSTALL_DIR/mysql/my.cnf -u root"
MYSQLCMD="$COLUMNSTORE_INSTALL_DIR/mysql/bin/mysql -u root"
export MYSQLCMD
fi

View File

@ -125,22 +125,22 @@ int main(int argc, char* argv[])
}
//my.cnf file
string mycnfFile = startup::StartUp::installDir() + "/mysql/my.cnf";
string mycnfFile = "/etc/my.cnf.d/columnstore.cnf";
ifstream mycnffile (mycnfFile.c_str());
if (!mycnffile)
{
cerr << "mycnfUpgrade - my.cnf file not found: " << mycnfFile << endl;
cerr << "mycnfUpgrade - columnstore.cnf file not found: " << mycnfFile << endl;
exit (1);
}
//my.cnf.rpmsave file
string mycnfsaveFile = startup::StartUp::installDir() + "/mysql/my.cnf.rpmsave";
string mycnfsaveFile = "/etc/my.cnf/columnstore.cnf.rpmsave";
ifstream mycnfsavefile (mycnfsaveFile.c_str());
if (!mycnfsavefile)
{
cerr << "mycnfUpgrade - my.cnf.rpmsave file not found: " << mycnfsaveFile << endl;
cerr << "mycnfUpgrade - columnstore.cnf.rpmsave file not found: " << mycnfsaveFile << endl;
exit (1);
}
@ -154,7 +154,7 @@ int main(int argc, char* argv[])
if (!includefile)
{
cerr << "mycnfUpgrade - my.cnf include argument file not found: " << includeFile << endl;
cerr << "mycnfUpgrade - columnstore.cnf include argument file not found: " << includeFile << endl;
exit (1);
}
@ -164,7 +164,7 @@ int main(int argc, char* argv[])
if (!excludefile)
{
cerr << "mycnfUpgrade - my.cnf exclude argument file not found: " << endl;
cerr << "mycnfUpgrade - columnstore.cnf exclude argument file not found: " << endl;
exit (1);
}
@ -177,7 +177,7 @@ int main(int argc, char* argv[])
includeArg = line;
boost::regex icludeArgRegEx("^#*\\s*" + includeArg + "\\s*=");
//see if in my.cnf.rpmsave
//see if in columnstore.cnf.rpmsave
ifstream mycnfsavefile (mycnfsaveFile.c_str());
char line[200];
string oldbuf;
@ -188,10 +188,10 @@ int main(int argc, char* argv[])
if ( boost::regex_search(oldbuf.begin(), oldbuf.end(), icludeArgRegEx) )
{
//found in my.cnf.rpmsave, check if this is commented out
//found in columnstore.cnf.rpmsave, check if this is commented out
if ( line[0] != '#' )
{
// no, check in my.cnf and replace if exist or add if it doesn't
// no, check in columnstore.cnf and replace if exist or add if it doesn't
ifstream mycnffile (mycnfFile.c_str());
vector <string> lines;
@ -214,7 +214,7 @@ int main(int argc, char* argv[])
lines.push_back(newbuf);
}
//write out a new my.cnf
//write out a new columnstore.cnf
mycnffile.close();
unlink (mycnfFile.c_str());
ofstream newFile (mycnfFile.c_str());
@ -251,7 +251,7 @@ int main(int argc, char* argv[])
lines.push_back(newbuf);
}
//write out a new my.cnf
//write out a new columnstore.cnf
mycnffile.close();
unlink (mycnfFile.c_str());
ofstream newFile (mycnfFile.c_str());

View File

@ -762,16 +762,16 @@ int main(int argc, char* argv[])
catch (...)
{}
// run my.cnf upgrade script
// run columnstore.cnf upgrade script
if ( reuseConfig == "y" )
{
cmd = installDir + "/bin/mycnfUpgrade > " + tmpDir + "/mycnfUpgrade.log 2>&1";
int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0)
cout << "Error: Problem upgrade my.cnf, check " << tmpDir << "/mycnfUpgrade.log" << endl;
cout << "Error: Problem upgrade columnstore.cnf, check " << tmpDir << "/mycnfUpgrade.log" << endl;
else
cout << "NOTE: my.cnf file was upgraded based on my.cnf.rpmsave" << endl;
cout << "NOTE: columnstore.cnf file was upgraded based on columnstore.cnf.rpmsave" << endl;
}
//check mysql port changes

View File

@ -5117,7 +5117,7 @@ int ProcessMonitor::changeMyCnf(std::string type)
log.writeLog(__LINE__, "changeMyCnf function called for " + type, LOG_TYPE_DEBUG);
string mycnfFile = startup::StartUp::installDir() + "/mysql/my.cnf";
string mycnfFile = "/etc/my.cnf.d/columnstore.cnf";
ifstream file (mycnfFile.c_str());
if (!file)
@ -5126,8 +5126,6 @@ int ProcessMonitor::changeMyCnf(std::string type)
return oam::API_FAILURE;
}
string dbDir = startup::StartUp::installDir() + "/mysql/db";
//get server-id based on ExeMgrx setup
string serverID = "0";
string localModuleName = config.moduleName();
@ -6691,7 +6689,7 @@ int ProcessMonitor::runUpgrade()
for ( int i = 0 ; i < 10 ; i++ )
{
//run upgrade script
string cmd = startup::StartUp::installDir() + "/mysql/bin/mysql_upgrade --defaults-file=" + startup::StartUp::installDir() + "/mysql/my.cnf " +
string cmd = startup::StartUp::installDir() + "/mysql/bin/mysql_upgrade " +
passwordOption + " > " + tmpLog + " 2>&1";
log.writeLog(__LINE__, "runUpgrade, cmd = " + cmd, LOG_TYPE_DEBUG);

View File

@ -1,124 +0,0 @@
#!/bin/bash
#
# $1 = testRunID
#
#=========================================================================================
# MySQL load SQL test results
#=========================================================================================
function getTestInfo {
#
testID=`cat $dirName/testInfo.txt | grep testID |awk -F"=" '{print $2}'`
}
function copySQLResultFiles {
#
rm -f /usr/local/mariadb/columnstore/data/bulk/data/import/TestSummary.*
rm -f /usr/local/mariadb/columnstore/data/bulk/data/import/TestTime.*
rm -f /usr/local/mariadb/columnstore/data/bulk/data/import/TestStats.*
#
cp -f testResultSummary.txt /usr/local/mariadb/columnstore/data/bulk/data/import/TestSummary.tbl
cp -f testResultTime.txt /usr/local/mariadb/columnstore/data/bulk/data/import/TestTime.tbl
cp -f testResultStats.txt /usr/local/mariadb/columnstore/data/bulk/data/import/TestStats.tbl
}
function CalLoadSQLTestResult {
#
/usr/local/mariadb/columnstore/bin/colxml perfstats -t TestSummary -j 1001
/usr/local/mariadb/columnstore/bin/colxml perfstats -t TestTime -j 1002
/usr/local/mariadb/columnstore/bin/colxml perfstats -t TestStats -j 1003
#
/usr/local/mariadb/columnstore/bin/cpimport -j 1001
/usr/local/mariadb/columnstore/bin/cpimport -j 1002
/usr/local/mariadb/columnstore/bin/cpimport -j 1003
}
#
function MySQLLoadSQLTestResult {
#
copySQLResultFiles
mysql lqrefd01 -hws_tkerr_tx.calpont.com -uroot -pqalpont! </root/genii/utils/scenarios/common/sql/load_TestSummary.sql
mysql lqrefd01 -hws_tkerr_tx.calpont.com -uroot -pqalpont! </root/genii/utils/scenarios/common/sql/load_TestTime.sql
mysql lqrefd01 -hws_tkerr_tx.calpont.com -uroot -pqalpont! </root/genii/utils/scenarios/common/sql/load_TestStats.sql
}
#=========================================================================================
# cpimport SQL test results
#=========================================================================================
function CalLoadSQLTestResult {
#
rm -f /usr/local/mariadb/columnstore/data/bulk/data/import/TestSummary.*
rm -f /usr/local/mariadb/columnstore/data/bulk/data/import/TestTime.*
rm -f /usr/local/mariadb/columnstore/data/bulk/data/import/TestStats.*
#
/usr/local/mariadb/columnstore/bin/colxml perfstats -t TestSummary -j 1001
/usr/local/mariadb/columnstore/bin/colxml perfstats -t TestTime -j 1002
/usr/local/mariadb/columnstore/bin/colxml perfstats -t TestStats -j 1003
#
cp -f testResultSummary.txt /usr/local/mariadb/columnstore/data/bulk/data/import/TestSummary.tbl
cp -f testResultTime.txt /usr/local/mariadb/columnstore/data/bulk/data/import/TestTime.tbl
cp -f testResultStats.txt /usr/local/mariadb/columnstore/data/bulk/data/import/TestStats.tbl
#
/usr/local/mariadb/columnstore/bin/cpimport -j 1001
/usr/local/mariadb/columnstore/bin/cpimport -j 1002
/usr/local/mariadb/columnstore/bin/cpimport -j 1003
}
#=========================================================================================
# cpimport bulk test results
#=========================================================================================
function CalLoadBulkTestResult {
#
rm -f /usr/local/mariadb/columnstore/data/bulk/data/import/BulkSummary.*
rm -f /usr/local/mariadb/columnstore/data/bulk/data/import/BulkTime.*
#
/usr/local/mariadb/columnstore/bin/colxml perfstats -t BulkSummary -j 1001
/usr/local/mariadb/columnstore/bin/colxml perfstats -t BulkStats -j 1002
#
cp -f testResultSummary.txt /usr/local/mariadb/columnstore/data/bulk/data/import/BulkSummary.tbl
cp -f testResultTime.txt /usr/local/mariadb/columnstore/data/bulk/data/import/BulkStats.tbl
#
/usr/local/mariadb/columnstore/bin/cpimport -j 1001
/usr/local/mariadb/columnstore/bin/cpimport -j 1002
}
#=========================================================================================
# Main
#=========================================================================================
#
if [ $# -ne 1 ]; then
echo Syntax: bulkExtcResult.sh testRunID
echo Exiting.....
exit 1
fi
#
# Verified existance of testRunID
#
testRunID=$1
host=`hostname -s`
dirName=/root/genii/testResult/$testRunID
#
if [ ! -d $dirName ]; then
echo TestRunID $testRunID does not exist on this server \($host\).
echo Please make sure the test was executed on this server.
echo Exit.....
exit 1
fi
cd $dirName
#
getTestInfo
if [ $loadFlag = "Y" ]; then
echo "Test result for $testRunID has been previously loaded."
echo "If you need to load it again, please reset the loaded flag"
echo "in the testInfo.txt file in the test result directory.
echo "exiting....
exit 1
fi
#
case "$testID" in
1)
CalLoadSQLTestResult
;;
2)
CalLoadBulkTestResult
;;
esac

View File

@ -1,263 +0,0 @@
#!/bin/bash
#
# $1 = testRunID
# $2 = testType, 1=SQL test, 2=Bulk test
#
# Check for correct number of command line parameters
#
#=========================================================================================
# get test information
#=========================================================================================
function getTestInfo {
#
testID=`cat $dirName/testInfo.txt | grep testID |awk -F"=" '{print $2}'`
calpontDB=`cat $dirName/testInfo.txt | grep testDB |awk -F"=" '{print $2}'`
execServer=`cat testInfo.txt|grep execServer|awk -F"=" '{print $2}'`
scriptName=`cat $dirName/testInfo.txt | grep scriptName |awk -F"=" '{print $2}'`
sessions=`cat $dirName/testInfo.txt | grep sessions |awk -F"=" '{print $2}'`
iterations=`cat $dirName/testInfo.txt | grep iterations |awk -F"=" '{print $2}'`
grpTestType=`cat $dirName/testInfo.txt | grep grpTestType |awk -F"=" '{print $2}'`
grpTestNum=`cat $dirName/testInfo.txt | grep grpTestNum |awk -F"=" '{print $2}'`
swVersion=`cat $dirName/1/getcalpontsoftwareinfo.log |grep Version |awk -F" " '{print $3}'`
swRelease=`cat $dirName/1/getcalpontsoftwareinfo.log |grep Release |awk -F" " '{print $3}'`
#
fileName=`basename $scriptName`
fileExt=${scriptName##*.}
testRunDesc=""
stackName=`cat 1/Columnstore.xml |grep "<SystemName>"|sed "s/</>/g"|awk -F">" '{print $3}'`
stackConfig=""
#
IOType=$grpTestType
#
echo 0 >tmpDM.txt
echo 0 >tmpUM.txt
echo 0 >tmpPM.txt
cat 1/getSystemStatus.b.log |grep Module |grep -v "DISABLED"|grep -v System|
while read c1 moduleName restOfLine; do
moduleType=${moduleName:0:2}
case "$moduleType" in
dm)
((numDM++))
echo $numDM >tmpDM.txt
;;
um)
((numUM++))
echo $numUM >tmpYM.txt
;;
pm)
((numPM++))
echo $numPM >tmpPM.txt
;;
esac
done
numDM=`cat tmpDM.txt`
numUM=`cat tmpUM.txt`
numPM=`cat tmpPM.txt`
}
#=========================================================================================
# Create SQL test stats
#=========================================================================================
function getSQLTestStats {
#
getSQLStats=0
#
if [ $1 -eq 0 ]; then
pathName="."
elif [ $2 -eq 0 ]; then
pathName="./$1"
else
pathName="./$1/$2"
getSQLStats=1
fi
st=`cat $pathName/starttime.log`
et=`cat $pathName/stoptime.log`
echo $testRunID\|$1\|$2\|0\|0\|$st\|$et\| >>testResultTime.txt
#
if [ $getSQLStats -eq 1 ] && [ $fileExt = "sql" ]; then
# get timing information
#
if [ $grpTestType = "M" ]; then
sfn=$2.sql
else
sfn=$fileName
fi
cat $sfn | grep CalpontStart >tmp1.txt
cat $pathName/$sfn.log|grep Calpont |grep -v now |grep -v calgetstats >tmp2.txt
#
cat tmp1.txt |
while read c1 c2 c3 idx qNum restofLine; do
st=`cat tmp2.txt |grep "CalpontStart ( ${idx} ${qNum} )" |awk -F" " '{print $6 " " $7}'`
et=`cat tmp2.txt |grep "CalpontEnd ( ${idx} ${qNum} )" |awk -F" " '{print $6 " " $7}'`
qstats=`cat tmp2.txt |grep "CalpontStats ( ${idx} ${qNum} )"`
echo $testRunID\|$1\|$2\|$qNum\|$idx\|$st\|$et\| >>testResultTime.txt
done
#
# get query stat information
#
cat $pathName/$sfn.log|grep CalpontStats|grep -v calgetstats|sed 's/\;//g'|sed 's/-/ /g'|sed 's/MB//g'|sed 's/|//g' >tmp2.txt
cat tmp1.txt |
while read c1 c2 c3 idx qNum restofLine; do
statLine=`cat tmp2.txt |grep "CalpontStats ( ${idx} ${qNum} )"`
#iteration 18, use the following line
qstats=`echo $statLine |awk -F" " '{print $9"|"$11"|"$13"|"$15"|"$17"|"$19"|"$21"|"$23"|"$25"|"$28"."$29"|"}'`
#iteration 17 and back, use the following line
# qstats=`echo $statLine |awk -F" " '{print $9"|"$11"|"$13"|"$15"|"$17"|"$19"|"$21"|"$23"|"$25"|"$26"."$27"|"}'`
qstats=`echo $qstats|sed 's/|\.|/||/g'`
echo $testRunID\|$1\|$2\|$qNum\|$idx\|$qstats>>testResultStats.txt
done
#
# print number of queries having errors
#
errCount=`grep "^ERROR" $pathName/$sfn.err.log | wc -l`
echo "error count for iteration " $1 "; session " $2 " is " $errCount >> testErrorCount.txt
fi
rm -f tmp*.txt
}
#=========================================================================================
# Create SQL test summary
#=========================================================================================
function getSQLTestSummary {
#
numStmts=`cat testResultTime.txt| grep -v "|0|"|grep -v "#"|wc -l`
touch tmp2.txt
cat testResultTime.txt| grep -v "|0|"|grep -v "#"|
while read statLine; do
st=`echo $statLine|awk -F"|" '{print $6}'`
et=`echo $statLine|awk -F"|" '{print $7}'`
if [ ! -z "$st" ] && [ ! -z "$et" ]; then
echo Y >>tmp2.txt
fi
done
numStmtsProcessed=`grep Y tmp2.txt|wc -l`
if [ $numStmts -eq $numStmtsProcessed ]; then
runCompleted=Y
else
runCompleted=N
fi
echo $testID\|$testRunID\|$testRunDesc\|$execServer\|$stackName\|$numDM\|$numUM\|$numPM\|$calpontDB\|$swVersion.$swRelease\|$grpTestNum\|$fileName\|$iterations\|$sessions\|$IOType\|$numStmts\|$numStmtsProcessed\|$runCompleted\| > testResultSummary.txt
rm -f tmp*.txt
}
#=========================================================================================
# Create bulk test stats
#=========================================================================================
function getBulkTestStats {
#
cat Job_9999.xml |grep "<Table" |
while read c1 tableName c2 sourceName restOfLine; do
tableName=`echo $tableName |awk -F"\"" '{print $2}'`
sourceName=`echo $sourceName |awk -F"\"" '{print $2}'`
loadTime=`cat Job_9999.log |grep "Finished reading"|grep $sourceName |awk -F" " '{print $13}'`
rowsProcessed=`cat Job_9999.log |grep "For table $tableName:"|grep "rows processed"|awk -F" " '{print $9}'`
rowsInserted=`cat Job_9999.log |grep "For table $tableName:"|grep "rows processed"|awk -F" " '{print $13}'`
echo $testRunID\|$tableName\|$sourceName\|$loadTime\|$rowsProcessed\|$rowsInserted\|NULL\| >>testResultStats.txt
done
}
#=========================================================================================
# Create bulk test summary
#=========================================================================================
function getBulkTestSummary {
#
#
st=`cat starttime.log`
et=`cat stoptime.log`
#
numTables=`cat Job_9999.xml |grep "<Table"|wc -l`
#
touch tmp1.txt
touch tmp2.txt
#
rowCntMatched=Y
cat testResultStats.txt|
while read statLine; do
elapsedTime=`echo $statLine|awk -F"|" '{print $4}'`
rowsProcessed=`echo $statLine|awk -F"|" '{print $5}'`
rowsInserted=`echo $statLine|awk -F"|" '{print $6}'`
if [ $rowsProcessed -ne $rowsInserted ]; then
rowCntMatched=N
fi
if [ ! -z $elapsedTime ]; then
echo Y >>tmp1.txt
fi
done
tablesLoaded=`grep Y tmp1.txt|wc -l`
#
if [ $numTables -eq $tablesLoaded ]; then
runCompleted=Y
else
runCompleted=N
fi
echo $testID\|$testRunID\|$testRunDesc\|$execServer\|$stackName\|$numDM\|$numUM\|$numPM\|$calpontDB\|$fileName\|$numTables\|$tablesLoaded\|$runCompleted\|$rowCntMatched\|$st\|$et\| > testResultSummary.txt
rm -f tmp*.txt
}
#=========================================================================================
# get SQL test results
#=========================================================================================
function getSQLTestResult {
#
getSQLTestStats 0 0
for (( i=1; i<=$iterations; i++ ))
do
getSQLTestStats $i 0
for (( s=1; s<=sessions; s++ ))
do
getSQLTestStats $i $s
done
done
getSQLTestSummary
}
#=========================================================================================
# get Bulk test results
#=========================================================================================
function getBulkTestResult {
#
getBulkTestStats
getBulkTestSummary
}
#=========================================================================================
# Main
#=========================================================================================
#
if [ $# -ne 1 ]; then
echo Syntax: collExtcResult.sh testRunID
echo Exiting.....
exit 1
fi
#
# Verified existance of testRunID
#
curDir=`pwd`
testRunID=$1
host=`hostname -s`
dirName=/root/genii/testResult/$testRunID
#
if [ ! -d $dirName ]; then
echo TestRunID $testRunID does not exist on this server \($host\).
echo Please make sure the test was executed on this server.
echo Exit.....
exit 1
fi
cd $dirName
#-----------------------------------------------------------------------------------------
# Initialize files
#-----------------------------------------------------------------------------------------
rm -f testResult*.txt
touch testResultTime.txt
touch testResultStats.txt
#
getTestInfo
case "$testID" in
1)
getSQLTestResult
;;
2)
getBulkTestResult
;;
esac
rm -rf tmp*.txt

View File

@ -1,26 +0,0 @@
#!/bin/bash
#
# This script does the following:
# 1) Executes supplied SQL script on reference database and captures output to file
# 2) Executes supplied SQL script on test database and captures output to file
# 3) diff both output files and captures different to file
#
#$1 = Test database name
#$2 = Ref server name
#$3 = Ref database name
#$4 = Ref user name
#$5 = Ref user password
#$6 = SQL script to execute
#
logFileName=`basename $6`
#
# Execute script on reference database
#
if [ $2 != "NA" ]; then
mysql $3 -h$2 -u$4 -p$5 <$6 > $logFileName.ref.log
fi
#
# Execute script on test database
#
/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf -f -u root $1 <$6 > $logFileName.test.log 2>&1
diff $logFileName.ref.log $logFileName.test.log > $logFileName.diff.log

View File

@ -1,189 +0,0 @@
#!/bin/bash
#
# $1 = testRunID
#
#=========================================================================================
# MySQL load SQL test results
#=========================================================================================
function getTestInfo {
#
testID=`cat $dirName/testInfo.txt | grep testID |awk -F"=" '{print $2}'`
loadedFlag=`cat $dirName/testInfo.txt | grep loadedFlag |awk -F"=" '{print $2}'`
if [ -z $loadedFlag ]; then
loadedFlag=N
fi
#
rm -f insertSummaryScript.sql
rm -f insertTimeScript.sql
rm -f insertStatsScript.sql
}
#=========================================================================================
# insert SQL test results
#=========================================================================================
function insertSQLTestResult {
#
# insert test summary table
#
summaryFileName="insertSummaryScript.sql"
cat $dirName/testResultSummary.txt |
while read summaryLine; do
testID=`echo $summaryLine|awk -F"|" '{print $1}'`
testRunID=`echo $summaryLine|awk -F"|" '{print $2}'`
testRunDesc=`echo $summaryLine|awk -F"|" '{print $3}'`
execServer=`echo $summaryLine|awk -F"|" '{print $4}'`
stackName=`echo $summaryLine|awk -F"|" '{print $5}'`
numDM=`echo $summaryLine|awk -F"|" '{print $6}'`
numUM=`echo $summaryLine|awk -F"|" '{print $7}'`
numPM=`echo $summaryLine|awk -F"|" '{print $8}'`
calpontDB=`echo $summaryLine|awk -F"|" '{print $9}'`
swRelease=`echo $summaryLine|awk -F"|" '{print $10}'`
grpTestNum=`echo $summaryLine|awk -F"|" '{print $11}'`
scriptFileName=`echo $summaryLine|awk -F"|" '{print $12}'`
numIterations=`echo $summaryLine|awk -F"|" '{print $13}'`
numSessions=`echo $summaryLine|awk -F"|" '{print $14}'`
IOType=`echo $summaryLine|awk -F"|" '{print $15}'`
numStmts=`echo $summaryLine|awk -F"|" '{print $16}'`
numStmtsProcessed=`echo $summaryLine|awk -F"|" '{print $17}'`
numCompleted=`echo $summaryLine|awk -F"|" '{print $18}'`
#
vals="$testID,$testRunID,\"$testRunDesc\",\"$execServer\",\"$stackName\",$numDM,$numUM,$numPM,\"$calpontDB\",\"$swRelease\",$grpTestNum,\"$scriptFileName\",$numIterations,$numSessions,\"$IOType\",$numStmts,$numStmtsProcessed,\"$numCompleted\""
stmt="insert into testSummary values ($vals);"
echo $stmt >> $summaryFileName
done
#
# insert test time table
#
timeFileName="insertTimeScript.sql"
cat $dirName/testResultTime.txt |
while read timeLine; do
testRunID=`echo $timeLine|awk -F"|" '{print $1}'`
iterNum=`echo $timeLine|awk -F"|" '{print $2}'`
sessNum=`echo $timeLine|awk -F"|" '{print $3}'`
SQLSeqNum=`echo $timeLine|awk -F"|" '{print $4}'`
SQLIdxNum=`echo $timeLine|awk -F"|" '{print $5}'`
startTime=`echo $timeLine|awk -F"|" '{print $6}'`
endTime=`echo $timeLine|awk -F"|" '{print $7}'`
#
vals="$testRunID,$iterNum,$sessNum,$SQLSeqNum,$SQLIdxNum,\"$startTime\",\"$endTime\""
vals=`echo $vals |sed 's/""/NULL/g'`
stmt="insert into testTime values ($vals);"
echo $stmt >> $timeFileName
done
#
# insert test stats table
#
statsFileName="insertStatsScript.sql"
cat $dirName/testResultStats.txt |
while read statsLine; do
vals=`echo $statsLine |sed 's/|/,/g'`
stmt="insert into testStats values ($vals);"
stmt=`echo $stmt |sed 's/,,/,NULL,/g'|sed 's/,,/,NULL,/g'|sed 's/,)/)/g'`
echo $stmt >> $statsFileName
done
#
mysql lqrefd01 -hws_tkerr_tx -uroot -pqalpont! <insertSummaryScript.sql
mysql lqrefd01 -hws_tkerr_tx -uroot -pqalpont! <insertTimeScript.sql
mysql lqrefd01 -hws_tkerr_tx -uroot -pqalpont! <insertStatsScript.sql
}
#=========================================================================================
# cpimport bulk test results
#=========================================================================================
function insertBulkTestResult {
#
# insert test summary table
#
summaryFileName="insertSummaryScript.sql"
cat $dirName/testResultSummary.txt |
while read summaryLine; do
testID=`echo $summaryLine|awk -F"|" '{print $1}'`
testRunID=`echo $summaryLine|awk -F"|" '{print $2}'`
testRunDesc=`echo $summaryLine|awk -F"|" '{print $3}'`
execServer=`echo $summaryLine|awk -F"|" '{print $4}'`
stackName=`echo $summaryLine|awk -F"|" '{print $5}'`
numDM=`echo $summaryLine|awk -F"|" '{print $6}'`
numUM=`echo $summaryLine|awk -F"|" '{print $7}'`
numPM=`echo $summaryLine|awk -F"|" '{print $8}'`
calpontDB=`echo $summaryLine|awk -F"|" '{print $9}'`
scriptFileName=`echo $summaryLine|awk -F"|" '{print $10}'`
numTables=`echo $summaryLine|awk -F"|" '{print $11}'`
numTablesLoaded=`echo $summaryLine|awk -F"|" '{print $12}'`
runCompleted=`echo $summaryLine|awk -F"|" '{print $13}'`
rowCntMatched=`echo $summaryLine|awk -F"|" '{print $14}'`
startTime=`echo $summaryLine|awk -F"|" '{print $15}'`
endTime=`echo $summaryLine|awk -F"|" '{print $16}'`
#
vals="$testID,$testRunID,\"$testRunDesc\",\"$execServer\",\"$stackName\",$numDM,$numUM,$numPM,\"$calpontDB\",\"$scriptFileName\",$numTables,$numTablesLoaded,\"$runCompleted\",\"$rowCntMatched\",\"$startTime\",\"$endTime\""
stmt="insert into bulkSummary values ($vals);"
stmt=`echo $stmt |sed 's/,,/,NULL,/g'|sed 's/,,/,NULL,/g'|sed 's/,)/)/g'`
echo $stmt >> $summaryFileName
done
#
# insert test stats table
#
statsFileName="insertStatsScript.sql"
cat $dirName/testResultStats.txt |
while read statsLine; do
testRunID=`echo $statsLine|awk -F"|" '{print $1}'`
tableName=`echo $statsLine|awk -F"|" '{print $2}'`
sourceFile=`echo $statsLine|awk -F"|" '{print $3}'`
loadTime=`echo $statsLine|awk -F"|" '{print $4}'`
rowCntProcessed=`echo $statsLine|awk -F"|" '{print $5}'`
rowCntInserted=`echo $statsLine|awk -F"|" '{print $6}'`
rowCntDB=`echo $statsLine|awk -F"|" '{print $7}'`
#
vals="$testRunID,\"$tableName\",\"$sourceFile\",$loadTime,$rowCntProcessed,$rowCntInserted,$rowCntDB"
stmt="insert into bulkStats values ($vals);"
stmt=`echo $stmt |sed 's/,,/,NULL,/g'|sed 's/,,/,NULL,/g'|sed 's/,)/)/g'`
echo $stmt >> $statsFileName
done
#
mysql lqrefd01 -hws_tkerr_tx -uroot -pqalpont! <insertSummaryScript.sql
mysql lqrefd01 -hws_tkerr_tx -uroot -pqalpont! <insertStatsScript.sql
#
}
#=========================================================================================
# Main
#=========================================================================================
#
if [ $# -ne 1 ]; then
echo Syntax: bulkExtcResult.sh testRunID
echo Exiting.....
exit 1
fi
#
# Verified existance of testRunID
#
testRunID=$1
host=`hostname -s`
dirName=/root/genii/testResult/$testRunID
#
if [ ! -d $dirName ]; then
echo TestRunID $testRunID does not exist on this server \($host\).
echo Please make sure the test was executed on this server.
echo Exit.....
exit 1
fi
#
getTestInfo
loadedFlag=N
if [ $loadedFlag = "Y" ]; then
echo "Test result for $testRunID has been previously loaded."
echo "If you need to load it again, please reset the loaded flag"
echo "in the testInfo.txt file in the test result directory.
echo "exiting....
exit 1
fi
#
case "$testID" in
1)
insertSQLTestResult
;;
2)
insertBulkTestResult
;;
esac
echo loadedFlag=Y >> $dirName/testInfo.txt
#
exit 0

View File

@ -1,41 +0,0 @@
#!/usr/bin/expect
#
# $Id: remote_command.sh 1122 2008-12-24 16:15:40Z dhill $
#
# Remote command execution script to another server
# Argument 1 - Remote Server Host Name or IP address
# Argument 2 - Remote Server root password
# Argument 3 - Command
set timeout 600
set USERNAME root
set SERVER [lindex $argv 0]
set PASSWORD [lindex $argv 1]
set COMMAND [lindex $argv 2]
set DEBUG [lindex $argv 3]
log_user $DEBUG
spawn -noecho /bin/bash
expect -re "# "
#
# send command
#
send "ssh $USERNAME@$SERVER $COMMAND\n"
expect {
-re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit -1}
-re "service not known" { send_user " FAILED: Invalid Host\n" ; exit -1}
-re "ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit -1 }
-re "authenticity" { send "yes\n"
expect {
-re "word: " { send "$PASSWORD\n" } abort
}
}
-re "word: " { send "$PASSWORD\n" } abort
}
expect {
-re "# " exit
-re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit -1 }
-re "(y or n)" { send "y\n"
expect -re "# " { exit }
}
}
exit

View File

@ -1,19 +0,0 @@
#!/bin/bash
#
#=========================================================================================
mount /dev/sdj1 /mnt/qadbs
#
rm -rf /usr/local/mariadb/columnstore/data1/000.dir
rm -rf /usr/local/mariadb/columnstore/data2/000.dir
rm -rf /usr/local/mariadb/columnstore/data3/000.dir
rm -rf /usr/local/mariadb/columnstore/data4/000.dir
rm -f /usr/local/mariadb/columnstore/data1/systemFiles/dbrm/*
#
cp /mnt/qadbs/tpch/1m-1-10-100/dbrm/* /usr/local/mariadb/columnstore/data1/systemFiles/dbrm
#
cp -r /mnt/qadbs/tpch/1m-1-10-100/data1/000.dir /usr/local/mariadb/columnstore/data1 &
cp -r /mnt/qadbs/tpch/1m-1-10-100/data2/000.dir /usr/local/mariadb/columnstore/data2 &
cp -r /mnt/qadbs/tpch/1m-1-10-100/data3/000.dir /usr/local/mariadb/columnstore/data3 &
cp -r /mnt/qadbs/tpch/1m-1-10-100/data4/000.dir /usr/local/mariadb/columnstore/data4 &
#

View File

@ -1,248 +0,0 @@
#!/bin/bash
#
#=========================================================================================
# Generate unique test run ID
#=========================================================================================
function genTestRunID {
#
testRunID="notthereyet"
dirName=""
while [ $testRunID = "notthereyet" ]
do
dirName=$(date +%Y%m%d%H%M%S)
if [ ! -d /root/genii/testResult/$dirName ]
then
mkdir /root/genii/testResult/$dirName
testRunID=$dirName
fi
done
}
#=========================================================================================
# Create unique test ID, create a directory for it, and cd into the test directory
#=========================================================================================
function prepareTestDir {
#
genTestRunID
cd /root/genii/testResult/$testRunID
echo TestResultDir=`pwd`
#
}
#=========================================================================================
# get test info
#=========================================================================================
function getTestInfo {
#
testID=`cat testInfo.txt | grep testID |awk -F"=" '{print $2}'`
testDB=`cat testInfo.txt | grep testDB |awk -F"=" '{print $2}'`
fileName=`cat testInfo.txt | grep scriptName |awk -F"=" '{print $2}'`
sessions=`cat testInfo.txt | grep sessions |awk -F"=" '{print $2}'`
iterations=`cat testInfo.txt | grep iterations |awk -F"=" '{print $2}'`
timeoutVal=`cat testInfo.txt | grep timeoutVal |awk -F"=" '{print $2}'`
testType=`cat testInfo.txt | grep grpTestType |awk -F"=" '{print $2}'`
dbmsType=`cat testInfo.txt | grep dbmsType |awk -F"=" '{print $2}'`
}
#=========================================================================================
# log test info
#=========================================================================================
function logTestInfo {
#
cp $execDir/testInfo.txt .
cp $fileName $logFileNamePrefix
execServer=`hostname -s`
echo execServer=$execServer >>testInfo.txt
}
#=========================================================================================
# log environment info
#=========================================================================================
function logEnvInfo {
#
# $1 = test run
# $2 = a or b, b=before test run, a=after test run
#
cp /usr/local/mariadb/columnstore/etc/Columnstore.xml $1/.
/usr/local/mariadb/columnstore/bin/mcsadmin getcalpontsoftwareinfo > $1/getcalpontsoftwareinfo.log
/usr/local/mariadb/columnstore/bin/mcsadmin getsystemstatus > $1/getSystemStatus.$2.log
/usr/local/mariadb/columnstore/bin/mcsadmin getsystemnetwork > $1/getSystemNetwork.$2.log
/usr/local/mariadb/columnstore/bin/mcsadmin getprocessstatus > $1/getProcessStatus.$2.log
}
#=========================================================================================
# log environment info
#=========================================================================================
function breakScriptFile {
#
numUsers=$1
idx=1
cat $logFileNamePrefix |
while read lineText; do
i=`expr index "$lineText" ^`
if [ $i -gt 0 ]; then
((idx++))
if [ $idx -gt $numUsers ]; then
idx=1
fi
else
echo "$lineText" >> $idx.sql
fi
done
}
#=========================================================================================
# Extract and output start and ending times
#=========================================================================================
function logTimes {
#
local dirName=""
if [ $1 -eq 0 ]
then
dirName="."
elif [ $2 -eq 0 ]
then
dirName=$1
else
dirName=$1/$2
fi
date "+%Y-%m-%d %H:%M:%S" > $dirName/$3time.log
}
#=========================================================================================
# Extract and output start and ending times
#=========================================================================================
function getTimes {
#
if [ $1 -eq 0 ]
then
st=`cat starttime.log`
et=`cat stoptime.log`
elif [ $2 -eq 0 ]
then
st=`cat $1\/starttime.log`
et=`cat $1\/stoptime.log`
else
st=`cat $1\/$2\/starttime.log`
et=`cat $1\/$2\/stoptime.log`
fi
echo $testRunID $1 $2 $st $et >>testResultSummary.txt
}
#=========================================================================================
# Waiting for sessions to finish.....
#=========================================================================================
function waitForDone {
#
# $1 = Test run number
#
# assume at least one session is not done
#
stillGoing=1
#
# Assuem all sesions are done.
# Keep checking all N sessions. If any one session is not done yet, keep going
#
while [ $stillGoing -gt 0 ]
do
stillGoing=0
for (( sess=1; sess<=sessions; sess++ ))
do
if [ ${pids[sess]} -ne 0 ]
then
lines=`ps -p ${pids[sess]} |wc -l`
if [ $lines -eq 1 ]
then
logTimes $1 $sess stop
pids[$sess]=0
# wc -l $1\/$sess\/$logFileNamePrefix.log > $1\/$sess\/rowCnt.txt
else
stillGoing=1
break
fi
fi
done
if [ $stillGoing -eq 1 ]
then
sleep 1
fi
done
}
#=========================================================================================
# Execute a single test run
#=========================================================================================
function execOneTestRun {
# $1 = Test run Number
#
logEnvInfo $1 b
logTimes $1 0 start
#
for (( sess=1; sess<=$sessions; sess++ ))
do
mkdir $1\/$sess
logTimes $1 $sess start
if [ $fileExt = "sh" ]; then
$fileName $1\/$sess\/$logFileNamePrefix.log &
else
if [ $testType = "M" ]; then
sfn=$sess.sql
else
sfn=`basename $fileName`
fi
if [ $dbmsType = "M" ]; then
pathSfn=$1\/$sess
/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root $testDB <$sfn 2> $pathSfn\/$sfn.err.log |grep "^Calpont" > $pathSfn\/$sfn.log &
else
su - oracle -c "sqlplus /nolog @/home/qa/srv/common/script/callogin.sql $testDB $testDB xe srvqaperf2 <$sfn" |grep "^Calpont" > $1\/$sess\/$sfn.log &
fi
fi
pids[$sess]=$!
done
#check for back ground status here
waitForDone $1
#
logTimes $1 0 stop
logEnvInfo $1 a
}
#=========================================================================================
# Execute a all test run
#=========================================================================================
function execAllTestRuns {
# $1 = Test run Number
#
cp $fileName $logFileNamePrefix
logTimes 0 0 start
for (( iter=1; iter<=$iterations; iter++ ))
do
echo iteration=$iter
mkdir $iter
execOneTestRun $iter
done
logTimes 0 0 stop
}
#=========================================================================================
# Main
#=========================================================================================
#
# Check file extension. Only .sql and .sh files are supported for now
#
execDir=$autopilotExecDir
rm -f /tmp/autopilotExecDir.txt
prepareTestDir
cp $execDir/testInfo.txt .
getTestInfo
fileExt=${fileName##*.}
logFileNamePrefix=`basename $fileName`
#
if [ $fileExt != "sql" ] && [ $fileExt != "sh" ]; then
echo Unsupported file. Only .sql and .sh files are currently supported.
exit
fi
#
# save the current directory so that we can change back to it after the test is done
#
echo filename=$fileName
logTestInfo
if [ "$testType" = "M" ]; then
breakScriptFile $sessions
fi
execAllTestRuns
echo testResultDir=$testRunID >>testInfo.txt
cp testInfo.txt $execDir

View File

@ -1,13 +0,0 @@
/*****************************************************************************
* Script Name: load_TestQuery.sql
* Date Created: 2008.08.25
* Author: Joseph Williams
* Purpose: Script to load the performance test result from a CSV file.
******************************************************************************/
LOAD DATA INFILE '/usr/local/mariadb/columnstore/data/bulk/data/import/TestStats.tbl'
INTO TABLE TestStats
FIELDS
TERMINATED BY '|'
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
(IterNum,SessNum,SQLSeqNum,SQLIdxNum,MaxMemPct,NumTempFiles,TempFieSpace,PhyIO,CacheIO,BlocksTouched,CasPartBlks,MsgBytesIn,MsgBytesOut,QuerySetupTime);

View File

@ -1,14 +0,0 @@
/*****************************************************************************
* Script Name: load_TestSumamry.sql
* Date Created: 2008.08.25
* Author: Joseph Williams
* Purpose: Script to load the performance test result from a CSV file.
******************************************************************************/
LOAD DATA INFILE '/usr/local/mariadb/columnstore/data/bulk/data/import/TestSummary.tbl'
INTO TABLE TestSummary
FIELDS
TERMINATED BY '|'
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
(TestID,TestRunID,TestRunDesc,ExecServer,StackName,numDM,numUM,numPM,CalpontDB,ScriptFileName,NumIterations,NumSessions,DataVolume,IOType,NumStmts,NumStmtsProcessed,RunCompleted);

View File

@ -1,13 +0,0 @@
/*****************************************************************************
* Script Name: load_TestTime.sql
* Date Created: 2008.08.25
* Author: Joseph Williams
* Purpose: Script to load the performance test result from a CSV file.
******************************************************************************/
LOAD DATA INFILE '/usr/local/mariadb/columnstore/data/bulk/data/import/TestTime.tbl'
INTO TABLE TestTime
FIELDS
TERMINATED BY '|'
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
(IterNum,SessNum,SQLSeqNum,SQLIdxNum,StartTime,EndTime);

View File

@ -1,9 +0,0 @@
Create table BulkStats (
TestRunID bigint,
TableName varchar(25),
SourceFile varchar(25),
LoadTime int,
RowCntProcessed bigint,
RowCntInserted bigint,
RowCntDB bigint
);

View File

@ -1,18 +0,0 @@
Create table BulkSummary (
TestID int,
TestRunID bigint,
TestRunDesc varchar(255),
ExecServer varchar(15),
StackName varchar(15),
numDM tinyint,
numUM tinyint,
numPM tinyint,
CalpontDB varchar(15),
ScriptFileName varchar(255),
NumTables tinyint,
NumTablesLoaded tinyint,
RunCompleted char(1),
RowCntsMatched char(1),
StartTime datetime,
EndTime datetime
);

View File

@ -1,4 +0,0 @@
Create table TestGroup (
GroupID int,
GroupDesc varchar(50)
);

View File

@ -1,17 +0,0 @@
create table TestStats (
TestRunID bigint,
IterNum int,
SessNum int,
SQLSeqNum int,
SQLIdxNum int,
MaxMemPct int,
NumTempFiles int,
TempFileSpace int,
PhyIO int,
CacheIO int,
BlocksTouched int,
CasPartBlks int,
MsgBytesIn int,
MsgBytesOut int,
QuerySetupTime decimal(18,6)
);

View File

@ -1,21 +0,0 @@
create table TestSummary (
TestID int,
TestRunID bigint,
TestRunDesc varchar(255),
ExecServer varchar(15),
StackName varchar(15),
numDM tinyint,
numUM tinyint,
numPM tinyint
CalpontDB varchar(15),
Software varchar(20),
GroupID int,
ScriptFileName varchar(255),
NumIterations int,
NumSessions int,
IOType char(1),
NumStmts int,
NumStmtsProcessed int,
RunCompleted char(1)
);

View File

@ -1,9 +0,0 @@
create table TestTime (
TestRunID bigint,
IterNum int,
SessNum int,
SQLSeqNum int,
SQLIdxNum int,
StartTime datetime,
EndTime datetime
);

View File

@ -1,4 +0,0 @@
Create table TestType (
TestID int,
TestDesc varchar(50)
);

View File

@ -1 +0,0 @@
0

View File

@ -1,62 +0,0 @@
#!/bin/bash
#
#$1 = dwweek
#$2 = start hour
#$3 = stop hour
#$4 = interval in minute
#
if [ $# -ne 4 ]; then
echo Syntax: dwControlBulk.sh testDB startHour stopHour intervalInMinutes
echo Exiting.....
exit 1
fi
#
testDB=$1
startHour=$2
stopHour=$(($3 - 1))
interval=$4
#
jobNum=0
#
keepGoing=1
while [ $keepGoing -eq 1 ]; do
vTime=$(date "+%H:%M:%S %x")
vHour=${vTime:0:2}
if [ $vHour -ge $startHour ] && [ $vHour -le $stopHour ]; then
vMin=${vTime:3:2}
vHour=`expr $vHour + 0`
vMin=`expr $vMin + 0`
minutes=$((($vHour + 1) * 60 + $vMin - ($startHour + 1) * 60))
remainder=`expr $minutes % $interval`
if [ $remainder -eq 0 ]; then
((jobNum++))
if [ $jobNum -gt 68 ]; then
jobNum=1
fi
if [ $jobNum -lt 10 ]; then
dirName=${vTime:15:4}${vTime:9:2}${vTime:12:2}_0$jobNum
mkdir $dirName
cd $dirName
/root/genii/utils/scenarios/dwweek/test/dwSubmitCpimport.sh $testDB lineitem_0$jobNum.tbl
else
dirName=${vTime:15:4}${vTime:9:2}${vTime:12:2}_$jobNum
mkdir $dirName
cd $dirName
/root/genii/utils/scenarios/dwweek/test/dwSubmitCpimport.sh $testDB lineitem_$jobNum.tbl
fi
cd ..
timeToSleep=1
else
timeToSleep=1
fi
else
timeToSleep=5
fi
sleep $timeToSleep
if [ -f /root/genii/utils/scenarios/dwweek/data/continue.txt ]; then
keepGoing=`cat /root/genii/utils/scenarios/dwweek/data/continue.txt`
fi
done

View File

@ -1,45 +0,0 @@
#!/bin/bash
#
#$1 = testDB
#$2 = start hour
#$3 = stop hour
#$4 = grpNum
#$5 = numConCur
#$6 = secsToPause
#
if [ $# -ne 6 ]; then
echo Syntax: dwControlGroup.sh testDB startHour stopHour groupNum NumConcurrentUsers secsToPause
echo Exiting.....
exit 1
fi
#
testDB=$1
startHour=$2
stopHour=$(($3 - 1))
grpNum=$4
numConCur=$5
secsToPause=$6
#
jobNum=0
#
keepGoing=1
while [ $keepGoing -eq 1 ]; do
vTime=$(date "+%H:%M:%S %x")
vHour=${vTime:0:2}
if [ $vHour -ge $startHour ] && [ $vHour -le $stopHour ]; then
dirName=Group$grpNum
mkdir -p $dirName
cd $dirName
/root/genii/utils/scenarios/perf/test/pfSubmitGroupTest.sh $grpNum $testDB $numConCur 1 S 0 M
sleep $secsToPause
cd ..
else
sleep 60
fi
if [ -f /root/genii/utils/scenarios/dwweek/data/continue.txt ]; then
keepGoing=`cat /root/genii/utils/scenarios/dwweek/data/continue.txt`
fi
done

View File

@ -1,50 +0,0 @@
#!/bin/bash
#
#$1 = testDB
#$2 = start hour
#
if [ $# -ne 2 ]; then
echo Syntax: dwControlNightly.sh testDB startHour
echo Exiting.....
exit 1
fi
#
testDB=$1
startHour=$2
#
keepGoing=1
nightlyDone=0
while [ $keepGoing -eq 1 ]; do
vTime=$(date "+%H:%M:%S %x")
vHour=${vTime:0:2}
if [ $vHour -eq $startHour ]; then
if [ $nightlyDone -eq 0 ]; then
dirName=nightly
mkdir -p $dirName
cd $dirName
#
# group to run nightly stats, pre-DML
/root/genii/utils/scenarios/perf/test/pfSubmitGroupTest.sh 204 $testDB 1 1 S 0 M
rm -rf *
# group to delete and update lineitem rows
/root/genii/utils/scenarios/perf/test/pfSubmitGroupTest.sh 203 $testDB 1 1 S 0 M
rm -rf *
# group to run nightly stats, post-DML
/root/genii/utils/scenarios/perf/test/pfSubmitGroupTest.sh 204 $testDB 1 1 S 0 M
rm -rf *
#
# backup database
# /root/genii/utils/scenarios/dwweek/test/dwbackup.sh
cd ..
nightlyDone=1
fi
else
nightlyDone=0
fi
sleep 60
if [ -f /root/genii/utils/scenarios/dwweek/data/continue.txt ]; then
keepGoing=`cat /root/genii/utils/scenarios/dwweek/data/continue.txt`
fi
done

View File

@ -1,38 +0,0 @@
#!/bin/bash
#
#$1 = testDB
#$2 = start hour
#
if [ $# -ne 2 ]; then
echo Syntax: dwControlReport.sh testDB startHour
echo Exiting.....
exit 1
fi
#
testDB=$1
startHour=$2
#
keepGoing=1
nightlyDone=0
while [ $keepGoing -eq 1 ]; do
vTime=$(date "+%H:%M:%S %x")
vHour=${vTime:0:2}
if [ $vHour -eq $startHour ]; then
if [ $nightlyDone -eq 0 ]; then
dirName=nightly
mkdir -p $dirName
cd $dirName
#
# group to run nightly, lengthy reports
/root/genii/utils/scenarios/perf/test/pfSubmitGroupTest.sh 205 $testDB 1 1 S 0 M
rm -rf *
cd ..
nightlyDone=1
fi
else
nightlyDone=0
fi
sleep 60
done

View File

@ -1,49 +0,0 @@
#!/bin/bash
#=========================================================================================
#
#$1 = testDB
#$2 = sourceFileName
#
if [ $# -lt 2 ]; then
echo Syntax dwSubmitCpimport.sh dbName sourceFileName
echo Exiting.....
exit 1
fi
#
testDB=$1
sourceFileName=$2
#
testID=2
#---------------------------------------------------------------------------
# Create a cpimport script, which will be executed by a PM remotely.
#---------------------------------------------------------------------------
bulkScriptName="bulkScript.sh"
#
echo \#!/bin/bash > $bulkScriptName
echo \# >> $bulkScriptName
#
echo rm -f /usr/local/mariadb/columnstore/data/bulk/log/Jobxml_9999.log >> $bulkScriptName
echo rm -f /usr/local/mariadb/columnstore/data/bulk/log/Job_9999.log >> $bulkScriptName
echo /usr/local/mariadb/columnstore/bin/colxml $testDB -t lineitem -l $sourceFileName -j 9999 >> $bulkScriptName
echo /usr/local/mariadb/columnstore/bin/cpimport -j 9999 >> $bulkScriptName
echo cp /usr/local/mariadb/columnstore/data/bulk/job/Job_9999.xml . >> $bulkScriptName
echo cp /usr/local/mariadb/columnstore/data/bulk/log/Jobxml_9999.log . >> $bulkScriptName
echo cp /usr/local/mariadb/columnstore/data/bulk/log/Job_9999.log . >> $bulkScriptName
chmod 777 $bulkScriptName
#
#append current directory path to to script file name
scriptFileName=`pwd`\/$bulkScriptName
#
autopilotExecDir=`pwd`
export autopilotExecDir
#
echo testID=$testID >testInfo.txt
echo testDB=$testDB >>testInfo.txt
echo testType=NA >>testInfo.txt
echo scriptName=$scriptFileName >>testInfo.txt
echo sessions=1 >>testInfo.txt
echo iterations=1 >>testInfo.txt
/root/genii/utils/scenarios/common/sh/testExecEngine.sh > testExec.log
testRunID=`cat testInfo.txt |grep testResultDir |awk -F"=" '{print $2}'`
/root/genii/utils/scenarios/common/sh/collExecResult.sh $testRunID >collExecResult.log
/root/genii/utils/scenarios/common/sh/insertExecResult.sh $testRunID >bulkExecResult.log

View File

@ -1,52 +0,0 @@
#!/bin/bash
#
numRoots=4
#
for ((idx=1; $idx<=$numRoots; idx++)); do
rm -rf /usr/local/mariadb/columnstore/data$idx/dwbackup/2 &
pids[$idx]=$!
done
#
keepChecking=1
while [ $keepChecking -eq 1 ]; do
keepChecking=0
for ((idx=1; $idx<=$numRoots; idx++)); do
if [ ${pids[idx]} -ne 0 ]
then
lines=`ps -p ${pids[idx]} |wc -l`
if [ $lines -eq 1 ]
then
pids[$idx]=0
else
keepChecking=1
fi
fi
done
sleep 5
done
#
for ((idx=1; $idx<=$numRoots; idx++)); do
mv /usr/local/mariadb/columnstore/data$idx/dwbackup/1 /usr/local/mariadb/columnstore/data$idx/dwbackup/2
mkdir -p /usr/local/mariadb/columnstore/data$idx/dwbackup/1
cp -r /usr/local/mariadb/columnstore/data$idx/000.dir /usr/local/mariadb/columnstore/data$idx/dwbackup/1 &
pids[$idx]=$!
done
#
keepChecking=1
while [ $keepChecking -eq 1 ]; do
keepChecking=0
for ((idx=1; $idx<=$numRoots; idx++)); do
if [ ${pids[idx]} -ne 0 ]
then
lines=`ps -p ${pids[idx]} |wc -l`
if [ $lines -eq 1 ]
then
pids[$idx]=0
else
keepChecking=1
fi
fi
done
sleep 5
done
cp -r /mnt/OAM/dbrm /usr/local/mariadb/columnstore/data1/dwbackup/1/.

View File

@ -1,20 +0,0 @@
#!/bin/bash
#
# test #1
# run user queries from 7:00am to 6:00pm
#
/root/genii/utils/scenarios/dwweek/test/dwControlGroup.sh dwweek 7 18 200 3 0 &
sleep 5
/root/genii/utils/scenarios/dwweek/test/dwControlGroup.sh dwweek 7 18 201 3 15 &
sleep 5
/root/genii/utils/scenarios/dwweek/test/dwControlGroup.sh dwweek 7 18 202 4 30 &
#
# run user query group #3 from 6:00pm to midnight
# Each run should take over one hour so we will stop initiating jobs after 10:00pm
# Effectively, jobs will finished sometime after 11:00pm
#
/root/genii/utils/scenarios/dwweek/test/dwControlGroup.sh dwweek 18 22 3 2 0 &
#
# Nightly delete, update, and backup -midnight to 7:00am
#
/root/genii/utils/scenarios/dwweek/test/dwControlNightly.sh dwweek 0 &

View File

@ -1,4 +0,0 @@
#!/bin/bash
#
/root/genii/utils/scenarios/dwweek/test/dwControlBulk.sh dwweek 7 24 15 &

View File

@ -1,11 +0,0 @@
The dwDMrun.sh script will start serveral back ground. They will start and stop queries jobs at
designated times. This script must be executed on the DM or UM.
The dwPMrun.sh script will start cpimport jobs at designated time. It must be executed on
the active PM.
To prevent the next job from starting (to cancel test), echo a 0 to the follow file
/home/qa/srv/autopilot/dwweek/data/continue.txt
echo 0 > /home/qa/srv/autopilot/dwweek/data/continue.txt

View File

@ -1,310 +0,0 @@
# GroupID SequenceNum FileName
#
# Group query #1 test
#
#1# 1 q2.3.1.1.1.sql
#1# 2 q2.3.1.1.2.sql
#
# Group query #2 test
#
#2# 1 q4.2.sql
#
# Group query #3 test
#
#3# 1 q4.3.sql
#3# 2 q4.4.sql
#3# 3 q4.6.1.sql
#3# 4 q4.6.2.sql
#3# 5 q4.6.sql
#
# Group query #4 test
#
#4# 1 q2.3.4.1.sql
#4# 2 q2.3.4.2.sql
#4# 3 q2.3.4.3.sql
#4# 4 q2.3.4.4.sql
#4# 5 q4.8.1.sql
#4# 6 q4.8.2.sql
#4# 7 q4.8.3.sql
#4# 8 q4.8.4.sql
#4# 9 q4.8.5.sql
#4# 10 q4.8.6.sql
#4# 11 q4.8.7.sql
#4# 12 q4.8.8.sql
#4# 13 q4.8.9.sql
#4# 14 q5.3.1.sql
#
# Group query #5 test
#
#5# 1 q2.3.2.1.1.sql
#5# 2 q2.3.2.1.2.sql
#5# 3 q2.3.2.1.3.sql
#5# 4 q2.3.2.1.4.sql
#5# 5 q2.3.6.sql
#5# 6 q5.1.1.sql
#5# 7 q5.1.2.sql
#5# 8 q5.1.3.sql
#5# 9 q5.2.1.sql
#5# 10 q5.2.2.sql
#5# 11 q5.2.3.sql
#5# 12 q5.2.4.sql
#5# 13 q5.2.5.sql
#5# 14 q5.4.1.sql
#5# 15 q5.4.2.sql
#5# 16 q5.4.3.sql
#
# Temp test groups
#
#6# 1 lineitemCPTest.sql
#
# Temp test groups
#
#7# 1 nation.sql
#7# 1 q1.sql
#7# 2 q2.sql
#7# 3 q3.sql
#7# 4 q4.sql
#
# PM scan test
#
#101# 1 pmscan.1.sql
#101# 2 pmscan.2.sql
#101# 3 pmscan.3.sql
#101# 4 pmscan.4.sql
#
# PM Join
#
#102# 1 pmmj.2tbls.1.sql
#102# 2 pmmj.2tbls.2.sql
#102# 3 pmmj.3tbls.1.sql
#102# 4 pmmj.3tbls.2.sql
#
# Aggregation functions
#
#103# 1 aggr.1tbl.avg.sql
#103# 2 aggr.1tbl.count.num.col.sql
#103# 3 aggr.1tbl.count.str.col.sql
#103# 4 aggr.1tbl.count.table.sql
#103# 5 aggr.1tbl.max.num.sql
#103# 6 aggr.1tbl.max.str.sql
#103# 7 aggr.1tbl.min.num.sql
#103# 8 aggr.1tbl.min.str.sql
#103# 9 aggr.1tbl.sum.sql
#103# 10 aggr.2tbls.avg.sql
#103# 11 aggr.2tbls.count.num.col.1.sql
#103# 12 aggr.2tbls.count.num.col.2.sql
#103# 13 aggr.2tbls.count.str.col.sql
#103# 14 aggr.2tbls.count.table.sql
#103# 15 aggr.2tbls.max.num.sql
#103# 16 aggr.2tbls.max.str.sql
#103# 17 aggr.2tbls.min.num.sql
#103# 18 aggr.2tbls.min.str.sql
#103# 19 aggr.2tbls.sum.sql
#
# Aggregation join
#
#104# 1 aj.pmmj.1.sql
#104# 2 aj.pmmj.2.sql
#104# 3 aj.ummj.1.sql
#104# 4 aj.ummj.2.sql
#
# UM Join
#
#105# 1 ummj.2tbls.1.sql
#105# 2 ummj.2tbls.2.sql
#105# 3 ummj.3tbls.1.sql
#105# 4 ummj.3tbls.2.sql
#
# DM post process for group by and order by clauses
#
#106# 1 dmpp.1tbl.groupby.1.sql
#106# 2 dmpp.1tbl.groupby.2.sql
#106# 3 dmpp.1tbl.groupby.orderby.num.1.sql
#106# 4 dmpp.1tbl.groupby.orderby.num.2.sql
#106# 5 dmpp.1tbl.groupby.orderby.num.str.sql
#106# 6 dmpp.1tbl.groupby.orderby.str.sql
#106# 7 dmpp.1tbl.orderby.1.sql
#106# 8 dmpp.1tbl.orderby.2.sql
#106# 9 dmpp.2tbls.groupby.1.sql
#106# 10 dmpp.2tbls.groupby.2.sql
#106# 11 dmpp.2tbls.groupby.orderby.num.1.sql
#106# 12 dmpp.2tbls.groupby.orderby.num.2.sql
#106# 13 dmpp.2tbls.groupby.orderby.str.sql
#106# 14 dmpp.2tbls.orderby.1.sql
#106# 15 dmpp.2tbls.orderby.2.sql
#
#
#
# Bench_HJ_Orders_Line.sql
#
#107# 1 q107.1.sql
#107# 2 q107.2.sql
#107# 3 q107.3.sql
#107# 4 q107.4.sql
#107# 5 q107.5.sql
#107# 6 q107.6.sql
#107# 7 q107.7.sql
#107# 8 q107.8.sql
#107# 9 q107.9.sql
#107# 10 q107.10.sql
#107# 11 q107.11.sql
#107# 12 q107.12.sql
#107# 13 q107.13.sql
#107# 14 q107.14.sql
#107# 15 q107.15.sql
#107# 16 q107.16.sql
#
#
# TPCH06_Modified.sql
#
#108# 2 q108.2.sql
#108# 3 q108.3.sql
#
#
# Bench_HJ_Part_PartSupp.sql
#
#109# 1 q109.1.sql
#109# 2 q109.2.sql
#109# 3 q109.3.sql
#109# 4 q109.4.sql
#109# 5 q109.5.sql
#109# 6 q109.6.sql
#109# 7 q109.7.sql
#109# 8 q109.8.sql
#109# 9 q109.9.sql
#109# 10 q109.10.sql
#109# 11 q109.11.sql
#109# 12 q109.12.sql
#109# 13 q109.13.sql
#
#
# Bench_HJ_Cust_Orders.sql
#
#110# 1 q110.1.sql
#110# 2 q110.2.sql
#110# 3 q110.3.sql
#110# 4 q110.4.sql
#110# 5 q110.5.sql
#110# 6 q110.6.sql
#110# 7 q110.7.sql
#110# 8 q110.8.sql
#110# 9 q110.9.sql
#110# 10 q110.10.sql
#110# 11 q110.11.sql
#110# 12 q110.12.sql
#110# 13 q110.13.sql
#110# 14 q110.14.sql
#110# 15 q110.15.sql
#110# 16 q110.16.sql
#
#
# Bench_Scan_Aggregate_7x.sql
#
#
#111# 1 q111.1.sql
#111# 2 q111.2.sql
#111# 3 q111.3.sql
#111# 4 q111.4.sql
#111# 5 q111.5.sql
#111# 6 q111.6.sql
#111# 7 q111.7.sql
#111# 8 q111.8.sql
#111# 9 q111.9.sql
#111# 10 q111.10.sql
#111# 11 q111.11.sql
#111# 12 q111.12.sql
#111# 13 q111.13.sql
#111# 14 q111.14.sql
#111# 15 q111.15.sql
#111# 16 q111.16.sql
#211# 17 q111.17.sql
#211# 18 q111.18.sql
#111# 19 q111.19.sql
#111# 20 q111.20.sql
#211# 21 q111.21.sql
#211# 22 q111.22.sql
#
#
# Bench_DBT3_Aggregation.sql
#
#
#112# 1 q112.1.sql
#112# 2 q112.2.sql
#112# 3 q112.3.sql
#112# 4 q112.4.sql
#112# 5 q112.5.sql
#112# 6 q112.6.sql
#
#
# dwweek - 4 concurrent users
#200# 1 week_scenario_jt_1.sql
#200# 2 week_scenario_jt_2.sql
#200# 3 week_scenario_jt_3.sql
#200# 4 week_scenario_jt_4.sql
#200# 5 week_scenario_jt_1.1.sql
#200# 6 week_scenario_jt_2.1.sql
#200# 7 week_scenario_jt_3.1.sql
#200# 8 week_scenario_jt_4.1.sql
#
# dwweek - 3 concurrent users with 15-second pause
#201# 1 week_scenario_jt_5_1.sql
#201# 2 week_scenario_jt_5_2.sql
#201# 3 week_scenario_jt_5_3.sql
#201# 4 week_scenario_jt_7.sql
#201# 5 week_scenario_jt_5_1.1.sql
#201# 6 week_scenario_jt_5_2.1.sql
#201# 7 week_scenario_jt_5_3.1.sql
#201# 8 week_scenario_jt_7.1.sql
#
# dwweek - 3 concurrent users with 30-second pause
#202# 1 q2.3.4.1.sql
#202# 2 q2.3.4.2.sql
#202# 3 q2.3.4.3.sql
#202# 4 q2.3.4.4.sql
#202# 5 q4.8.1.sql
#202# 6 q4.8.2.sql
#202# 7 q4.8.3.sql
#202# 8 q4.8.4.sql
#202# 9 q4.8.5.sql
#202# 10 q4.8.6.sql
#202# 11 q4.8.7.sql
#202# 12 q4.8.8.sql
#202# 13 q4.8.9.sql
#202# 14 q5.3.1.sql
#
# dwweek - delete and update
#
#203# 1 delete.mod.sql
#203# 2 update.sql
#
# dwweek - nightly stats
#
#204# 1 lineitemstats.sql
#
# dwweek - nightly lengthy reports
#
#
# dwweek - 4 concurrent users
#300# 1 week_scenario_jt_1.sql
#
# dwweek - 4 concurrent users
#301# 1 week_scenario_jt_1.sql
#301# 2 week_scenario_jt_2.sql
#
# dwweek - 4 concurrent users
#302# 1 week_scenario_jt_1.sql
#302# 2 week_scenario_jt_2.sql
#302# 3 week_scenario_jt_3.sql
#
# dwweek - 4 concurrent users
#303# 1 week_scenario_jt_1.sql
#303# 2 week_scenario_jt_2.sql
#303# 3 week_scenario_jt_3.sql
#303# 4 week_scenario_jt_4.sql

View File

@ -1,65 +0,0 @@
create table SQLTestSummary (
TestID int,
TestRunID char(14),
TestRunDesc varchar(255),
ExecServer varchar(15),
StackName varchar(15),
numDM tinyint,
numUM tinyint,
numPM tinyint,
CalpontDB varchar(15),
ScriptFileName varchar(255),
NumIterations tinyint,
NumSessions tinyint,
NumSQLStmts tinyint,
DataVolume char(1),
IOType char(1),
NumStmts int,
NumStmtsProcessed int,
RunCompleted char(1)
)engine=infinidb;
create table SQLTestTime (
TestRunID char(14),
IterNum tinyint,
SessNum tinyint,
SQLSeqNum tinyint,
StartTime datetime,
EndTime datetime
)engine=infinidb;
create table BulkTestSummary (
TestID int,
TestRunID char(14),
TestRunDesc varchar(255),
ExecServer varchar(15),
StackName varchar(15),
numDM tinyint,
numUM tinyint,
numPM tinyint,
CalpontDB varchar(15),
ScriptFileName varchar(255),
NumTables tinyint,
NumTablesLoaded tinyint,
RunCompleted char(1)
)engine=infinidb;
create table BulkTestStats (
TestRunID char(14),
TableName varchar(25),
SourceFile varchar(25),
LoadTime int,
RowsProcessed bigint,
RowsInserted bigint
)engine=infinidb;

View File

@ -1,6 +0,0 @@
#! /bin/sh
#
#$1 = testRunID
#
host=`hostname -s`
smbclient //calweb/perf -Wcalpont -Uoamuser%Calpont1 -D "/results/${host}" -c "lcd /root/genii/testResult;recurse;prompt OFF;mput $1"

View File

@ -1,23 +0,0 @@
#!/bin/bash
#
# This script does the following:
# 1) Executes supplied SQL script on test database and captures output to file
#
#$1 = Test database name
#$2 = SQL script to execute
if [ $# -lt 2 ]
then
echo***** Syntax: pfExeSQLScript.sh testDBName scriptFileName
exit 1
fi
#
logFileName=`basename $2`
#
# Execute script on reference database
#
# mysql $3 -h$2 -u$4 -p$5 <$6 > $logFileName.test.log
#
# Execute script on test database
#
/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf -u root $1 <$2 > $logFileName.test.log
exit 0

View File

@ -1,3 +0,0 @@
#!/bin/bash
#
# This script does the following:

View File

@ -1,91 +0,0 @@
#!/bin/bash
#
function getGroupQueries {
gid=$1
tt=$2
dt=$3
#
groupNum=$gid
idx=`cat idx.txt`
cat /root/genii/utils/scenarios/perf/data/perfGrpQueryList.txt |grep "#$gid#" |
while read gid queryNum fileName; do
((idx++))
if [ $tt = "D" ] || [ $tt = "C" ]; then
echo select \'CalpontFlush \( $idx $queryNum \)\', calflushcache\(\)\; >> $scriptFileName
fi
#
if [ $dt = "M" ]; then
echo select \'CalpontStart \( $idx $queryNum \)\', now\(\)\; >> $scriptFileName
else
echo execute calpont.caltraceon\(9\)\; >> $scriptFileName
echo select \'CalpontStart \( $idx $queryNum \)\', sysdate from dual\; >> $scriptFileName
fi
#
cat /root/genii/utils/scenarios/perf/sql/$groupNum/$fileName >>$scriptFileName
#
if [ $dt = "M" ]; then
echo select \'CalpontEnd \( $idx $queryNum \)\', now\(\)\; >> $scriptFileName
echo select \'CalpontStats \( $idx $queryNum \)\', calgetstats\(\)\; >> $scriptFileName
else
echo select \'CalpontEnd \( $idx $queryNum \)\', sysdate from dual\; >> $scriptFileName
echo select \'CalpontStats \( $idx $queryNum \)\', calpont.getstats\(\) from dual\; >> $scriptFileName
fi
#
if [ $tt = "C" ]; then
((idx++))
if [ $dt = "M" ]; then
echo select \'CalpontStart \( $idx $queryNum \)\', now\(\)\; >> $scriptFileName
else
echo select \'CalpontStart \( $idx $queryNum \)\', sysdate from dual\; >> $scriptFileName
fi
cat /root/genii/utils/scenarios/perf/sql/$groupNum/$fileName >>$scriptFileName
if [ $dt = "M" ]; then
echo select \'CalpontEnd \( $idx $queryNum \)\', now\(\)\; >> $scriptFileName
echo select \'CalpontStats \( $idx $queryNum \)\', calgetstats\(\)\; >> $scriptFileName
else
echo select \'CalpontEnd \( $idx $queryNum \)\', sysdate from dual\; >> $scriptFileName
echo select \'CalpontStats \( $idx $queryNum \)\', calpont.getstats\(\) from dual\; >> $scriptFileName
fi
fi
if [ $tt = "M" ]; then
echo ^ >> $scriptFileName
fi
echo $idx > idx.txt
done
}
if [ $# -lt 3 ]; then
echo ***** pfGetGroupQueries.sh queryGroupNumber testType dbmsType
echo testType=S Stream run. No primproc disk cache flush
echo testType=D Disk run. Flush cache before executing each query
echo testType=C Cache run. Flush cache before 1st execution. No flush before 2nd execution.
echo testType=M Stream run. All queries from groups 1 to 5
exit 1
fi
#
grpID=$1
testType=$2
dbmsType=$3
#
if [ $testType = M ]; then
scriptFileName=GroupQueryMixed.sql
else
scriptFileName=GroupQuery$grpID.sql
fi
rm -rf $scriptFileName
#
groupNum=$groupNum
echo $idx >idx.txt
#
#
case "$testType" in
S|D|C)
getGroupQueries $grpID $testType $dbmsType
;;
M)
for (( g=1; g<=5; g++)); do
getGroupQueries $g $testType $dbmsType
done
;;
esac
rm -f idx.txt
exit 0

View File

@ -1 +0,0 @@
Select o_orderdate, o_custkey from orders where o_orderkey in (select l_orderkey from lineitem where l_partkey < 100000);

View File

@ -1 +0,0 @@
Select o_orderdate, o_custkey from orders where exists (select * from lineitem where l_partkey < 100000 and l_orderkey = o_orderkey);

View File

@ -1 +0,0 @@
Select o_orderdate, o_custkey from orders where o_orderkey not in (select l_orderkey from lineitem where l_partkey < 100000);

View File

@ -1 +0,0 @@
select o_orderdate, o_custkey from orders where not exists (select * from lineitem where l_partkey < 100000 and l_orderkey = o_orderkey);

View File

@ -1 +0,0 @@
Select o_orderdate, o_custkey from orders where o_custkey < 1000 and o_orderkey in (select l_orderkey from lineitem where l_partkey < 100000);

View File

@ -1 +0,0 @@
Select o_orderdate, o_custkey from orders where o_custkey < 1000 and exists (select * from lineitem where l_partkey < 100000 and l_orderkey = o_orderkey);

View File

@ -1 +0,0 @@
Select o_orderdate, o_custkey from orders where o_custkey < 1000 and o_orderkey not in (select l_orderkey from lineitem where l_partkey < 100000);

View File

@ -1 +0,0 @@
Select o_orderdate, o_custkey from orders where o_custkey < 1000 and not exists (select * from lineitem where l_partkey < 100000 and l_orderkey = o_orderkey);

View File

@ -1 +0,0 @@
Select orders.* from lineitem, orders where o_custkey < 100000 and l_partkey < 10000 and l_orderkey = o_orderkey;

View File

@ -1 +0,0 @@
Select l_receiptdate - l_shipdate from lineitem where l_orderkey < 1000000 and l_commitdate < l_receiptdate;

View File

@ -1 +0,0 @@
Select .x. from lineitem where l_orderkey < 1000000;

View File

@ -1,11 +0,0 @@
select p_brand, sum(l_quantity) tot_qty,
avg(l_quantity) avg_qty,
sum(l_extendedprice * (1- l_discount )) tot_price,
avg(l_extendedprice * (1- l_discount )) avg_price, count(*)
from lineitem, part
where l_shipdate between '1996-04-01' and '1996-04-14'
and l_partkey = p_partkey
and p_size = 5
group by rollup( p_brand)
order by 1;

View File

@ -1,20 +0,0 @@
select revenue_month,
decode(district,32768,' n/a',null,' ','District ' || district) district,
decode( trunc(max(latest_date),'MM') + interval '1' month - interval '1' day,
max(latest_date),null, 'Thru-' || to_char(max(latest_date),'mm-dd-yyyy')) latest_date,
sales_items,
total_revenue,
max(latest_date) -120 max_date,
decode(sign(decode(district,32768,5000000000,null,5000000000,1600000000)-total_revenue),1,'','Revenue Exceeds Threshold') Trend_Alert
from (
select to_char(l_shipdate,'YYYY-MM') Revenue_Month,
l_district district,
max(l_shipdate) Latest_date,
sum(l_extendedprice) Total_Revenue, count(*) Sales_items
from v_load_lines
where l_shipdate >= trunc(to_date('&max_date'),'MM')
group by to_char(l_shipdate,'YYYY-MM'), l_district
ORDER BY 1,2)
group by revenue_month, district, total_revenue, sales_items
order by 1,2;

View File

@ -1,9 +0,0 @@
select to_char(l_shipdate,'yyyy-mm'), sum(l_extendedprice), avg(p_retailprice)
from lineitem, part
where l_shipdate between '1993-01-01' and '1994-06-30'
and l_partkey = p_partkey
and p_retailprice >= 2095
and p_size <= 5
group by rollup( to_char(l_shipdate,'yyyy-mm'))
order by 1,2;

View File

@ -1,9 +0,0 @@
Select l_shipdate, l_orderkey, l_partkey from lineitem where l_orderkey < 1000000 order by 1,2,3;
select calgetstats();
select now();
Select l_shipdate, l_orderkey, l_partkey from lineitem where l_orderkey < 1000000 order by 1,2,3;
select calgetstats();
quit

View File

@ -1,9 +0,0 @@
Select * from lineitem where l_orderkey < 1000000 order by l_orderkey, l_linenumber;
select calgetstats();
select now();
Select * from lineitem where l_orderkey < 1000000 order by l_orderkey, l_linenumber;
select calgetstats();
quit

View File

@ -1 +0,0 @@
Select l_shipdate, l_orderkey, l_partkey from lineitem where l_orderkey < 1000000 order by 1, 2, 3;

View File

@ -1 +0,0 @@
Select * from lineitem where l_orderkey < 1000000 order by l_orderkey, l_linenumber;

View File

@ -1,9 +0,0 @@
select l_shipdate, l_partkey from lineitem where l_orderkey < 1000000 order by 1, 2;
select calgetstats();
select now();
select l_shipdate, l_partkey from lineitem where l_orderkey < 1000000 order by 1, 2;
select calgetstats();
quit

View File

@ -1 +0,0 @@
select l_shipdate, l_partkey from lineitem where l_orderkey < 1000000 order by 1, 2;

View File

@ -1,9 +0,0 @@
Select o_orderdate, o_custkey from lineitem, orders where l_partkey < 100000 and l_orderkey = o_orderkey order by 1, 2;
select calgetstats();
select now();
Select o_orderdate, o_custkey from lineitem, orders where l_partkey < 100000 and l_orderkey = o_orderkey order by 1, 2;
select calgetstats();
quit

View File

@ -1,9 +0,0 @@
Select o_orderdate, o_custkey from lineitem, orders where o_custkey < 1000 and l_orderkey = o_orderkey order by 1, 2;
select calgetstats();
select now();
Select o_orderdate, o_custkey from lineitem, orders where o_custkey < 1000 and l_orderkey = o_orderkey order by 1, 2;
select calgetstats();
quit

View File

@ -1,9 +0,0 @@
select c_custkey, o_orderkey from customer left outer join orders on c_custkey = o_custkey where c_custkey < 10000 and c_nationkey = 4 order by 1, 2;
select calgetstats();
select now();
select c_custkey, o_orderkey from customer left outer join orders on c_custkey = o_custkey where c_custkey < 10000 and c_nationkey = 4 order by 1, 2;
select calgetstats();
quit

View File

@ -1,9 +0,0 @@
select c_custkey, o_orderkey from orders right outer join customer on c_custkey = o_custkey where c_custkey < 10000 and c_nationkey = 4 order by 1, 2;
select calgetstats();
select now();
select c_custkey, o_orderkey from orders right outer join customer on c_custkey = o_custkey where c_custkey < 10000 and c_nationkey = 4 order by 1, 2;
select calgetstats();
quit

View File

@ -1,9 +0,0 @@
Select * from lineitem, orders where o_custkey < 100000 and l_partkey < 10000 and l_orderkey = o_orderkey order by l_orderkey, l_linenumber;
select calgetstats();
select now();
Select * from lineitem, orders where o_custkey < 100000 and l_partkey < 10000 and l_orderkey = o_orderkey order by l_orderkey, l_linenumber;
select calgetstats();
quit

View File

@ -1 +0,0 @@
Select o_orderdate, o_custkey from lineitem, orders where l_partkey < 100000 and l_orderkey = o_orderkey order by 1, 2;

View File

@ -1 +0,0 @@
Select o_orderdate, o_custkey from orders,lineitem where o_custkey < 1000 and o_orderkey = l_orderkey order by 1, 2;

View File

@ -1 +0,0 @@
select c_custkey, o_orderkey from customer left outer join orders on c_custkey = o_custkey where c_custkey < 10000 and c_nationkey = 4 order by 1, 2;

View File

@ -1 +0,0 @@
select c_custkey, o_orderkey from orders right outer join customer on c_custkey = o_custkey where c_custkey < 10000 and c_nationkey = 4 order by 1, 2;

View File

@ -1 +0,0 @@
Select * from lineitem, orders where o_custkey < 100000 and l_partkey < 10000 and l_orderkey = o_orderkey order by l_orderkey, l_linenumber;

View File

@ -1,9 +0,0 @@
Select l_shipmode, max(l_shipdate), min(l_shipdate) from lineitem where l_orderkey < 1000000 group by l_shipmode order by 1;
select calgetstats();
select now();
Select l_shipmode, max(l_shipdate), min(l_shipdate) from lineitem where l_orderkey < 1000000 group by l_shipmode order by 1;
select calgetstats();
quit

View File

@ -1,9 +0,0 @@
Select o_orderpriority, min(o_orderstatus), max(o_orderstatus) from orders where o_orderkey < 1000000 group by o_orderpriority order by o_orderpriority;
select calgetstats();
select now();
Select o_orderpriority, min(o_orderstatus), max(o_orderstatus) from orders where o_orderkey < 1000000 group by o_orderpriority order by o_orderpriority;
select calgetstats();
quit

View File

@ -1,9 +0,0 @@
Select o_shippriority, sum(o_totalprice), avg(o_totalprice), count(*) from orders where o_orderkey < 1000000 group by o_shippriority;
select calgetstats();
select now();
Select o_shippriority, sum(o_totalprice), avg(o_totalprice), count(*) from orders where o_orderkey < 1000000 group by o_shippriority;
select calgetstats();
quit

View File

@ -1,45 +0,0 @@
select
l_returnflag,
l_linestatus,
sum(l_quantity) as sum_qty,
sum(l_extendedprice) as sum_base_price,
avg(l_quantity) as avg_qty,
avg(l_extendedprice) as avg_price,
avg(l_discount) as avg_disc,
count(*) as count_order
from
lineitem
where
l_shipdate <= date '1998-09-26'
group by l_returnflag,
l_linestatus
order by
l_returnflag,
l_linestatus;
select calgetstats();
select now();
select
l_returnflag,
l_linestatus,
sum(l_quantity) as sum_qty,
sum(l_extendedprice) as sum_base_price,
avg(l_quantity) as avg_qty,
avg(l_extendedprice) as avg_price,
avg(l_discount) as avg_disc,
count(*) as count_order
from
lineitem
where
l_shipdate <= date '1998-09-26'
group by l_returnflag,
l_linestatus
order by
l_returnflag,
l_linestatus;
select calgetstats();
quit

View File

@ -1,9 +0,0 @@
Select l_shipdate Revenue_day, l_discount district, max(l_shipdate) Latest_date, sum(l_extendedprice) Total_Revenue, count(*) Sales_Items from lineitem group by l_shipdate, l_discount order by 1,2;
select calgetstats();
select now();
Select l_shipdate Revenue_day, l_discount district, max(l_shipdate) Latest_date, sum(l_extendedprice) Total_Revenue, count(*) Sales_Items from lineitem group by l_shipdate, l_discount order by 1,2;
select calgetstats();
quit

View File

@ -1,9 +0,0 @@
Select min(l_suppkey) from lineitem;
select calgetstats();
select now();
Select min(l_suppkey) from lineitem;
select calgetstats();
quit

View File

@ -1,9 +0,0 @@
Select max(l_shipdate) from lineitem;
select calgetstats();
select now();
Select max(l_shipdate) from lineitem;
select calgetstats();
quit

Some files were not shown because too many files have changed in this diff Show More