Cat mysql log if sandbox fails to start.

This commit is contained in:
Daniel Nichter
2011-08-22 09:11:29 -06:00
parent c6724c3e70
commit c79c917fe7

View File

@@ -45,14 +45,16 @@ make_sandbox() {
# Start the sandbox and check that it has InnoDB.
/tmp/$port/start
if [ $? -eq 0 ]; then
/tmp/$port/use -e 'show /*!40100 engine*/ innodb status' | grep 'INNODB MONITOR OUTPUT' >/dev/null 2>&1
/tmp/$port/use -e 'SHOW /*!40100 ENGINE*/ INNODB STATUS' | grep 'INNODB MONITOR OUTPUT' >/dev/null 2>&1
# grep exits 0 if lines are found
if [ $? -ne 0 ]; then
echo "****** WARNING sandbox doesn't have a working InnoDB! ******"
cat /tmp/$port/data/mysqld.log
exit 1
fi
else
echo "Sandbox $type $port failed to start."
cat /tmp/$port/data/mysqld.log
exit 1
fi