List:Commits« Previous MessageNext Message »
From:Rafal Somla Date:May 5 2010 3:40pm
Subject:bzr commit into mysql-5.1 branch (Rafal.Somla:3453)
View as plain text  
#At file:///ext/mysql/bzr/mysql-5.1-meb-testing/ based on revid:rafal.somla@stripped

 3453 Rafal Somla	2010-05-05
      Remove example tests from the regular meb suite. Extend
      innobackup example with restore part.
     @ mysql-test/suite/meb/examples
        Separate directory for example tests.
     @ mysql-test/suite/meb/examples/ibb_example.test
        Move example tests to the examples/ directory.
     @ mysql-test/suite/meb/examples/inb_example.test
        Move example tests to the examples/ directory.
        Add the restore part.
     @ mysql-test/suite/meb/include/clear_dir.inc
        Convenience file for deleting all files in given directory.

    added:
      mysql-test/suite/meb/examples/
      mysql-test/suite/meb/include/clear_dir.inc
    renamed:
      mysql-test/suite/meb/t/ibb_example.test => mysql-test/suite/meb/examples/ibb_example.test
      mysql-test/suite/meb/t/inb_example.test => mysql-test/suite/meb/examples/inb_example.test
    modified:
      mysql-test/suite/meb/examples/ibb_example.test
      mysql-test/suite/meb/examples/inb_example.test
=== added directory 'mysql-test/suite/meb/examples'
=== renamed file 'mysql-test/suite/meb/t/ibb_example.test' => 'mysql-test/suite/meb/examples/ibb_example.test'
--- a/mysql-test/suite/meb/t/ibb_example.test	2010-05-05 11:47:52 +0000
+++ b/mysql-test/suite/meb/examples/ibb_example.test	2010-05-05 15:40:24 +0000
@@ -10,10 +10,6 @@
 
 --echo == Preparing test data
 --disable_query_log
-let $ENGINE_1 = MyISAM;
-let $ENGINE_2 = InnoDB;
-let $ENGINE_3 = InnoDB;
-let $ENGINE_3_USES_TABLESPACE = 0;
 --source suite/meb/include/extreme_data.inc
 --enable_query_log
 
@@ -25,9 +21,8 @@ let $ENGINE_3_USES_TABLESPACE = 0;
 --exec $IBBACKUP --apply-log $BACKUP_CNF
 --exec ls -l $BACKUP_DIR
 
-# TODO: restart server with restored data.
+# TODO: Add the restore part.
 
 --echo == DONE ==
 --source suite/meb/include/extreme_drop.inc
-#--abort
 --exit

=== renamed file 'mysql-test/suite/meb/t/inb_example.test' => 'mysql-test/suite/meb/examples/inb_example.test'
--- a/mysql-test/suite/meb/t/inb_example.test	2010-05-05 11:47:52 +0000
+++ b/mysql-test/suite/meb/examples/inb_example.test	2010-05-05 15:40:24 +0000
@@ -10,10 +10,6 @@
 
 --echo == Preparing test data
 --disable_query_log
-let $ENGINE_1 = MyISAM;
-let $ENGINE_2 = InnoDB;
-let $ENGINE_3 = InnoDB;
-let $ENGINE_3_USES_TABLESPACE = 0;
 --source suite/meb/include/extreme_data.inc
 --enable_query_log
 
@@ -31,9 +27,20 @@ let $inbopts= $inbopts --user=root; 
 --exec $INNOBACKUP $inbopts --apply-log $SERVER_CNF $BACKUP_DIR/innobackup 2>&1
 --exec ls -l $BACKUP_DIR/innobackup
 
-# TODO: restore part (stop server, copy files, restart server).
+--echo == Server shut-down
+--source suite/meb/include/stop_mysqld.inc
+
+--echo == Removing old server data
+let $CLEAR_DIR= $MYSQL_DATADIR;
+--source suite/meb/include/clear_dir.inc
+--exec $INNOBACKUP --copy-back $SERVER_CNF $BACKUP_DIR/innobackup 2>&1
+
+--echo == Restarting server
+--source suite/meb/include/restart_mysqld.inc
+
+--echo == Checking that data is back
+SHOW DATABASES;
 
---echo == DONE ==
 --source suite/meb/include/extreme_drop.inc
-#--abort
+--echo == DONE ==
 --exit

=== added file 'mysql-test/suite/meb/include/clear_dir.inc'
--- a/mysql-test/suite/meb/include/clear_dir.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/meb/include/clear_dir.inc	2010-05-05 15:40:24 +0000
@@ -0,0 +1,5 @@
+let CLEAR_DIR= $CLEAR_DIR;
+--perl
+  use File::Path qw(rmtree);
+  rmtree($ENV{CLEAR_DIR});
+EOF


Attachment: [text/bzr-bundle] bzr/rafal.somla@sun.com-20100505154024-2ixjphmdlj5gm8ri.bundle
Thread
bzr commit into mysql-5.1 branch (Rafal.Somla:3453)Rafal Somla5 May