1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-17 09:41:06 +03:00
Files
mariadb-columnstore-engine/mysql/queries/nightly/srvswdev11/test010.sh
2016-01-06 14:08:59 -06:00

39 lines
1010 B
Bash
Executable File

#!/bin/bash
#
# Test 10. Drop partition test.
#
# Imports rows, drops a partition, disables another partition, does some DML, then runs a few
# validation queries.
. ../scripts/common.sh $1
TEST=test010
STATUSTEXT="010 Drop Partition Test: "
$MYSQLCMD -e "set global infinidb_compression_type=0;"
# Default the status to In Progress.
echo "$STATUSTEXT In Progress" > $TEST.status
cd $TEST
./go10.sh > $TEST.log 2>&1
cd ..
#
# Populate the .status file.
#
eval $(cat $TEST/*.log | tr '[:upper:]' '[:lower:]' | awk 'BEGIN{good=bad=error=0;} /good/ {good++;} /bad/ {bad++;} /error/ {error++} END{printf "good=%d\nbad=%d\nerror=%d\n", good, bad, error;}')
# If no good counts, fail it.
if [ $error -gt 0 ] || [ $good -eq 0 ] || [ $bad -gt 0 ]; then
echo "$STATUSTEXT Failed (bad count=$bad, good count=$good, error count=$error)" > $TEST.status
ret=1
else
echo "$STATUSTEXT Passed ($good counts all matched!)" > $TEST.status
ret=0
fi
echo ""
cat $TEST.status
exit $ret