# Test specific of MyISAM's online backup:
# see if --external-locking=1 causes backup to fail as expected

--source include/not_embedded.inc
--source include/have_myisam_or_maria_default.inc

disable_query_log;
call mtr.add_suppression("Backup:");
call mtr.add_suppression("Restore:");
enable_query_log;

#
# Cleanup from former test cases
#
--disable_warnings
USE test;
DROP DATABASE IF EXISTS mysqltest;
--enable_warnings
let $MYSQLD_BACKUPDIR= `SELECT @@backupdir`;
--error 0,1
remove_file $MYSQLD_BACKUPDIR/test.ba;

CREATE DATABASE mysqltest;
USE mysqltest;
CREATE TABLE t1 (a int);

--replace_column 1 #
--error ER_GET_ERRMSG
BACKUP DATABASE mysqltest TO 'test.ba';

#
# Cleanup from this test case
#
USE test;
DROP DATABASE mysqltest;
# Note: The backup file should not exist as BACKUP command failed.
--error 1
remove_file $MYSQLD_BACKUPDIR/test.ba;

