#!/bin/bash
DBHOST=`hostname`

cat <<EOF > t.sql 
drop if exists table t1;
create table t1 ( primary a string(5) not null, b string(10));

drop if exists table t2;
create table t2 ( a string(5) not null, b string(10));
create btree b2 on t2(a);

drop if exists table t3;
create table t3 ( a string(5) not null, b string(10));
create btree b3 on t3(a);

EOF

../../src/cgclt --tableset=TS1 --server=$DBHOST --user=lemke/lemke --batchfile=t.sql

../../src/cgblow --mode=insert --iset=s:4,s:5 --table=t1 --server=$DBHOST --port=2200 --tableset=TS1 --user=lemke/lemke --append --interval=1000 --count=100000 --protocol=serial $@

../../src/cgblow --mode=insert --iset=s:4,s:5 --table=t2 --server=$DBHOST --port=2200 --tableset=TS1 --user=lemke/lemke --append --interval=1000 --count=10000 --protocol=serial $@

../../src/cgblow --mode=insert --iset=s:4,s:5 --table=t3 --server=$DBHOST --port=2200 --tableset=TS1 --user=lemke/lemke --append --interval=1000 --count=10000 --protocol=serial $@ 
