#!/bin/sh

if ( test -z "$1" )
then
	echo "usage: dropintest [mysql|postgresql]"
	exit
fi

if ( test "$1" = "mysql" )
then
	./mysql localhost 0 "/var/lib/mysql/mysql.sock" testuser testpassword
	echo
	echo
	echo
	export LD_PRELOAD=/usr/local/firstworks/lib/libmysql3sqlrelay-0.35.so.1.0.0
	./mysql localhost 8006 "" mysqltest mysqltest
fi


if ( test "$1" = "postgresql" )
then
	./postgresql localhost "" testuser testpassword testdb
	echo
	echo
	echo
	export LD_PRELOAD=/usr/local/firstworks/lib/libpqsqlrelay-0.35.so.1.0.0
	./postgresql localhost /tmp/postgresqltest.socket postgresqltest postgresqltest testdb
fi
