[MCOL-1514] Validate columnstore table can be created at the end of postconfig Created: 2018-06-28  Updated: 2021-02-19  Resolved: 2021-02-19

Status: Closed
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: None
Fix Version/s: N/A

Type: New Feature Priority: Major
Reporter: Dipti Joshi (Inactive) Assignee: Todd Stoffel (Inactive)
Resolution: Won't Do Votes: 0
Labels: None


 Description   

When postconfig completes, it prints system started successfully.

Add an additional check before printing the success message - which does following
"CREATE TABLE TEST_TBL (a int, b int) engine=columnstore"

Make sure this table can be created successfully. Only if this is successful, then print "System started successfully"



 Comments   
Comment by David Hill (Inactive) [ 2018-06-28 ]

we have a script that we can call to test this out, it was used in the past at InfiniDB to validate builds. So this can be called as part of installs. It will be a little tricker on seperate um /pm systems when postCOnfigure is running on pm1, but its doable..

Need to update the test script for columnstore from infinidb.

../build/mini-test.sh

#!/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

Generated at Thu Feb 08 02:29:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.