DROP DATABASE IF EXISTS db1;
CREATE DATABASE db1;
USE db1;
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1),(2),(3);
SET SESSION debug="-d,";
SELECT @@debug;
@@debug

BACKUP DATABASE db1 TO 'db1.bak';
backup_id
#
SHOW WARNINGS;
Level	Code	Message
SELECT max(backup_id) INTO @id FROM mysql.backup_history 
WHERE command LIKE 'BACKUP DATABASE db1 %';
SELECT drivers FROM mysql.backup_history WHERE backup_id=@id;
drivers
MyISAM
SET SESSION debug="+d,backup_test_dummy_be_factory";
SELECT @@debug;
@@debug
d,backup_test_dummy_be_factory
BACKUP DATABASE db1 TO 'db1.bak';
backup_id
#
SHOW WARNINGS;
Level	Code	Message
Warning	#	Cannot create backup engine for storage engine MyISAM
SELECT max(backup_id) INTO @id FROM mysql.backup_history 
WHERE command LIKE 'BACKUP DATABASE db1 %';
SELECT drivers FROM mysql.backup_history WHERE backup_id=@id;
drivers
Default
RESTORE FROM 'db1.bak' OVERWRITE;
backup_id
#
SHOW TABLES IN db1;
Tables_in_db1
t1
DROP DATABASE db1;
SET GLOBAL debug="-d,";
