===== backup_snapshot.test 1.3 vs edited ===== --- 1.3/mysql-test/t/backup_snapshot.test 2007-11-16 11:25:49 -05:00 +++ edited/backup_snapshot.test 2007-11-16 11:16:44 -05:00 @@ -19,6 +19,7 @@ # --source include/have_falcon.inc +--source include/have_innodb.inc --source include/have_debug.inc --disable_warnings @@ -37,27 +38,42 @@ # # Create a table and load it with lots of data. -CREATE TABLE bup_snapshot.t1 (word CHAR(20)) ENGINE=FALCON; +CREATE TABLE bup_snapshot.t1 (word CHAR(30)) ENGINE=FALCON; -INSERT INTO bup_snapshot.t1 VALUES ("01 Some data to test"); -INSERT INTO bup_snapshot.t1 VALUES ("02 Some data to test"); -INSERT INTO bup_snapshot.t1 VALUES ("03 Some data to test"); -INSERT INTO bup_snapshot.t1 VALUES ("04 Some data to test"); -INSERT INTO bup_snapshot.t1 VALUES ("05 Some data to test"); -INSERT INTO bup_snapshot.t1 VALUES ("06 Some data to test"); -INSERT INTO bup_snapshot.t1 VALUES ("07 Some data to test"); -INSERT INTO bup_snapshot.t1 VALUES ("08 Some data to test"); -INSERT INTO bup_snapshot.t1 VALUES ("09 Some data to test"); -INSERT INTO bup_snapshot.t1 VALUES ("10 Some data to test"); +INSERT INTO bup_snapshot.t1 VALUES ("01 Some data: FALCON"); +INSERT INTO bup_snapshot.t1 VALUES ("02 Some data: FALCON"); +INSERT INTO bup_snapshot.t1 VALUES ("03 Some data: FALCON"); +INSERT INTO bup_snapshot.t1 VALUES ("04 Some data: FALCON"); +INSERT INTO bup_snapshot.t1 VALUES ("05 Some data: FALCON"); +INSERT INTO bup_snapshot.t1 VALUES ("06 Some data: FALCON"); +INSERT INTO bup_snapshot.t1 VALUES ("07 Some data: FALCON"); +INSERT INTO bup_snapshot.t1 VALUES ("08 Some data: FALCON"); +INSERT INTO bup_snapshot.t1 VALUES ("09 Some data: FALCON"); +INSERT INTO bup_snapshot.t1 VALUES ("10 Some data: FALCON"); # Use a non-CS supported table to show driver can coexist with default driver CREATE TABLE bup_snapshot.t2 (a int) ENGINE=MEMORY; INSERT INTO bup_snapshot.t2 VALUES (1), (2), (3), (4), (5); +CREATE TABLE bup_snapshot.t3 (word CHAR(30)) ENGINE=INNODB; + +INSERT INTO bup_snapshot.t3 VALUES ("01 Some data: INNODB"); +INSERT INTO bup_snapshot.t3 VALUES ("02 Some data: INNODB"); +INSERT INTO bup_snapshot.t3 VALUES ("03 Some data: INNODB"); +INSERT INTO bup_snapshot.t3 VALUES ("04 Some data: INNODB"); +INSERT INTO bup_snapshot.t3 VALUES ("05 Some data: INNODB"); +INSERT INTO bup_snapshot.t3 VALUES ("06 Some data: INNODB"); +INSERT INTO bup_snapshot.t3 VALUES ("07 Some data: INNODB"); +INSERT INTO bup_snapshot.t3 VALUES ("08 Some data: INNODB"); +INSERT INTO bup_snapshot.t3 VALUES ("09 Some data: INNODB"); +INSERT INTO bup_snapshot.t3 VALUES ("10 Some data: INNODB"); + --echo con1: Show that the new data doesn't exist before backup. -SELECT * FROM bup_snapshot.t1 WHERE word LIKE '-%'; +SELECT * FROM bup_snapshot.t1 WHERE word LIKE 'FALCON%'; +SELECT * FROM bup_snapshot.t3 WHERE word LIKE 'INNODB%'; SELECT COUNT(*) FROM bup_snapshot.t1; SELECT COUNT(*) FROM bup_snapshot.t2; +SELECT COUNT(*) FROM bup_snapshot.t3; connection con2; @@ -86,15 +102,23 @@ WHERE info LIKE "backup database %"; --source include/wait_condition.inc -INSERT INTO bup_snapshot.t1 VALUES("- Dave Mathews"); -INSERT INTO bup_snapshot.t1 VALUES("- Yes"); -INSERT INTO bup_snapshot.t1 VALUES("- Jethro Tull"); -DELETE FROM bup_snapshot.t1 WHERE word LIKE '10%'; +INSERT INTO bup_snapshot.t1 VALUES("FALCON - Dave Mathews"); +INSERT INTO bup_snapshot.t1 VALUES("FALCON - Yes"); +INSERT INTO bup_snapshot.t1 VALUES("FALCON - Jethro Tull"); +DELETE FROM bup_snapshot.t1 WHERE word LIKE '0%'; + +INSERT INTO bup_snapshot.t3 VALUES("INNODB - Dave Mathews"); +INSERT INTO bup_snapshot.t3 VALUES("INNODB - Yes"); +INSERT INTO bup_snapshot.t3 VALUES("INNODB - Jethro Tull"); +DELETE FROM bup_snapshot.t3 WHERE word LIKE '10%'; --echo con2: Showing the data after inserts. -SELECT * FROM bup_snapshot.t1 WHERE word LIKE '-%'; +SELECT * FROM bup_snapshot.t1 WHERE word LIKE 'FALCON%'; SELECT COUNT(*) FROM bup_snapshot.t1; +SELECT * FROM bup_snapshot.t3 WHERE word LIKE 'INNODB%'; +SELECT COUNT(*) FROM bup_snapshot.t3; + --echo con2: Release lock on driver. SELECT release_lock("backup_cs_locked"); @@ -107,14 +131,17 @@ --echo con1: Dropping the database DROP TABLE bup_snapshot.t1; +DROP TABLE bup_snapshot.t3; --echo con1: Restoring the database RESTORE FROM "bup_snapshot.bak"; --echo con1: Showing the data (no new data should be here). -SELECT * FROM bup_snapshot.t1 WHERE word LIKE '-%'; +SELECT * FROM bup_snapshot.t1 WHERE word LIKE 'FALCON%'; +SELECT * FROM bup_snapshot.t3 WHERE word LIKE 'INNODB%'; SELECT COUNT(*) FROM bup_snapshot.t1; SELECT COUNT(*) FROM bup_snapshot.t2; +SELECT COUNT(*) FROM bup_snapshot.t3; remove_file $MYSQLTEST_VARDIR/master-data/bup_snapshot.bak; @@ -145,14 +172,21 @@ WHERE info LIKE "backup database %"; --source include/wait_condition.inc -INSERT INTO bup_snapshot.t1 VALUES("- Dave Mathews"); -INSERT INTO bup_snapshot.t1 VALUES("- Yes"); -INSERT INTO bup_snapshot.t1 VALUES("- Jethro Tull"); -DELETE FROM bup_snapshot.t1 WHERE word LIKE '10%'; +INSERT INTO bup_snapshot.t1 VALUES("FALCON - Dave Mathews"); +INSERT INTO bup_snapshot.t1 VALUES("FALCON - Yes"); +INSERT INTO bup_snapshot.t1 VALUES("FALCON - Jethro Tull"); +DELETE FROM bup_snapshot.t1 WHERE word LIKE '0%'; + +INSERT INTO bup_snapshot.t3 VALUES("INNODB - Dave Mathews"); +INSERT INTO bup_snapshot.t3 VALUES("INNODB - Yes"); +INSERT INTO bup_snapshot.t3 VALUES("INNODB - Jethro Tull"); +DELETE FROM bup_snapshot.t3 WHERE word LIKE '10%'; --echo con2: Showing the data after inserts. -SELECT * FROM bup_snapshot.t1 WHERE word LIKE '-%'; +SELECT * FROM bup_snapshot.t1 WHERE word LIKE 'FALCON%'; +SELECT * FROM bup_snapshot.t3 WHERE word LIKE 'INNODB%'; SELECT COUNT(*) FROM bup_snapshot.t1; +SELECT COUNT(*) FROM bup_snapshot.t3; --echo con2: Release lock on driver. SELECT release_lock("backup_cs_reading"); @@ -171,9 +205,11 @@ RESTORE FROM "bup_snapshot.bak"; --echo con1: Showing the data (no new data should be here). -SELECT * FROM bup_snapshot.t1 WHERE word LIKE '-%'; +SELECT * FROM bup_snapshot.t1 WHERE word LIKE 'FALCON%'; +SELECT * FROM bup_snapshot.t3 WHERE word LIKE 'INNODB%'; SELECT COUNT(*) FROM bup_snapshot.t1; SELECT COUNT(*) FROM bup_snapshot.t2; +SELECT COUNT(*) FROM bup_snapshot.t3; DROP DATABASE bup_snapshot;