cd /mdk/doc/manual/sql/

echo "DROP DATABASE m23;" | mysql 2> err

if test `find /mdk/doc/manual/sql/err -printf "%s"` -gt 0
then
        echo "could not DROP example database"
        cat /mdk/doc/manual/sql/err
        exit 1
fi

echo "CREATE DATABASE m23;" | mysql 2> err

if test `find /mdk/doc/manual/sql/err -printf "%s"` -gt 0
then
        echo "could not CREATE new database"
        cat /mdk/doc/manual/sql/err
        exit 1
fi

mysql m23 < currentDB.sql 2> err

if test `find /mdk/doc/manual/sql/err -printf "%s"` -gt 0
then
        echo "could not RESTORE current database"
        cat /mdk/doc/manual/sql/err
        exit 1
fi
