MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Hema Sridharan Date:July 28 2009 2:30am
Subject:bzr commit into mysql-5.4 branch (hema:2849) WL#4732
View as plain text  
#At file:///export/home/tmp/WL4732-0727/mysql-6.0-backup/ based on revid:ingo.struewing@stripped

 2849 Hema Sridharan	2009-07-28
      WL#4732 (Interoperability testing). This worklog will verify the interoperability of backup and other server operations.
      added:
        mysql-test/suite/backup_extra/r/backup_interop.result
        mysql-test/suite/backup_extra/t/backup_interop.test

=== added file 'mysql-test/suite/backup_extra/r/backup_interop.result'
--- a/mysql-test/suite/backup_extra/r/backup_interop.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/backup_extra/r/backup_interop.result	2009-07-28 02:30:27 +0000
@@ -0,0 +1,36 @@
+CREATE DATABASE db1;
+CREATE TABLE db1.large1(number INT);
+CREATE PROCEDURE db1.filler()
+BEGIN
+DECLARE TABLE_SIZE, MAX_TABLE_SIZE INT DEFAULT 0;
+SELECT @@SESSION.MAX_HEAP_TABLE_SIZE INTO MAX_TABLE_SIZE;
+DELETE FROM db1.large1;
+INSERT INTO db1.large1 VALUES(repeat('a', 255));
+REPEAT
+INSERT INTO db1.large1 SELECT * FROM db1.large1;
+SELECT COUNT(*) FROM db1.large1 INTO TABLE_SIZE;
+UNTIL TABLE_SIZE > MAX_TABLE_SIZE*2
+END REPEAT;
+END ||
+CALL db1.filler();
+INSERT INTO db1.large1 SELECT * FROM db1.large1;
+INSERT INTO db1.large1 SELECT * FROM db1.large1;
+INSERT INTO db1.large1 SELECT * FROM db1.large1;
+INSERT INTO db1.large1 SELECT * FROM db1.large1;
+SELECT COUNT(*) FROM db1.large1;
+COUNT(*)
+67108864
+# Execute backup operation
+BACKUP DATABASE db1 TO 'db1.bak';
+backup_id
+#
+# Create all objects in database db1
+# Executing the RQG grammar for creating objects
+# Now run RQG grammar along with reporter file
+# Executing RQG test. See rqg_inter.out in the temp dir for output.
+# Test clean-up section
+DROP PROCEDURE db1.filler;
+DROP DATABASE db1;
+# The server variables might be changed because of server operations 
+# that are executed in the grammar file. Reset them back to original 
+# values

=== added file 'mysql-test/suite/backup_extra/t/backup_interop.test'
--- a/mysql-test/suite/backup_extra/t/backup_interop.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/backup_extra/t/backup_interop.test	2009-07-28 02:30:27 +0000
@@ -0,0 +1,85 @@
+# This test file is for WL#4732 (Interoperability testing).
+# The objects for database db1 will be created in the RQG grammar file 
+# backup_obj.yy. The server operations will be executed by grammar file 
+# backup_interop.yy. Backup and Restore operations will be executed
+# periodically from the reporter file. These RQG test files will be embedded
+# with MTR. The intention of mysql test file is to create database, tables 
+# and load some data before the objects are created from grammar file. 
+# This way BACKUP will take some time to complete while concurrent server 
+# operations are executed.
+#
+# Set the RQG_HOME variable before executing the test. Environment variable 
+# RQG_HOME should point to RQG installation.
+#
+
+--source include/have_innodb.inc
+--source include/have_rqg.inc
+
+let $bdir=`select @@backupdir`;
+
+let $saved_format=`select @@binlog_format`;
+let $query_cache_size =`SELECT @@query_cache_size`;
+let $key_buffer_size =`SELECT @@key_buffer_size`;
+let $event_scheduler_save=`SELECT @@event_scheduler`;
+
+CREATE DATABASE db1;
+CREATE TABLE db1.large1(number INT);
+
+DELIMITER ||;
+CREATE PROCEDURE db1.filler()
+BEGIN
+ DECLARE TABLE_SIZE, MAX_TABLE_SIZE INT DEFAULT 0;
+ SELECT @@SESSION.MAX_HEAP_TABLE_SIZE INTO MAX_TABLE_SIZE;
+ DELETE FROM db1.large1;
+ INSERT INTO db1.large1 VALUES(repeat('a', 255));
+ REPEAT
+   INSERT INTO db1.large1 SELECT * FROM db1.large1;
+   SELECT COUNT(*) FROM db1.large1 INTO TABLE_SIZE;
+   UNTIL TABLE_SIZE > MAX_TABLE_SIZE*2
+ END REPEAT;
+ END ||
+
+DELIMITER ;||
+
+CALL db1.filler();
+INSERT INTO db1.large1 SELECT * FROM db1.large1;
+INSERT INTO db1.large1 SELECT * FROM db1.large1;
+INSERT INTO db1.large1 SELECT * FROM db1.large1;
+INSERT INTO db1.large1 SELECT * FROM db1.large1;
+SELECT COUNT(*) FROM db1.large1;
+
+--echo # Execute backup operation
+--replace_column 1 #
+BACKUP DATABASE db1 TO 'db1.bak';
+
+--echo # Create all objects in database db1
+let $grammar1= $RQG_HOME/conf/backup_obj.yy;
+
+--echo # Executing the RQG grammar for creating objects
+--exec perl $RQG_HOME/gentest.pl --dsn=dbi:mysql:host=127.0.0.1:port=$MASTER_MYPORT:user=root:database=db1 --grammar=$grammar1  --duration=600  --seed=time >$MYSQL_TMP_DIR/rqg_obj.out 2>&1
+
+--echo # Now run RQG grammar along with reporter file
+let $grammar2= $RQG_HOME/conf/backup_interop.yy;
+let $reporter= BackupInterop;
+
+--echo # Executing RQG test. See rqg_inter.out in the temp dir for output.
+--exec perl $RQG_HOME/gentest.pl --dsn=dbi:mysql:host=127.0.0.1:port=$MASTER_MYPORT:user=root:database=db1 --grammar=$grammar2 --threads=10 --duration=600  --reporter=$reporter --seed=time >$MYSQL_TMP_DIR/rqg_inter.out 2>&1
+
+--echo # Test clean-up section
+
+DROP PROCEDURE db1.filler;
+DROP DATABASE db1;
+
+--echo # The server variables might be changed because of server operations 
+--echo # that are executed in the grammar file. Reset them back to original 
+--echo # values
+
+--disable_query_log
+eval SET GLOBAL EVENT_SCHEDULER= '$event_scheduler_save';
+eval SET GLOBAL BINLOG_FORMAT= '$saved_format';
+eval SET GLOBAL KEY_BUFFER_SIZE= $key_buffer_size;
+eval SET GLOBAL QUERY_CACHE_SIZE= $query_cache_size;
+--enable_query_log
+
+--remove_file $bdir/db1.bak
+--exit

Thread
bzr commit into mysql-5.4 branch (hema:2849) WL#4732Hema Sridharan28 Jul