From: kevin.lewis Date: May 23 2012 2:51pm Subject: bzr push into mysql-trunk branch (kevin.lewis:3907) List-Archive: http://lists.mysql.com/commits/143952 Message-Id: <20120523145149.2BE8B220A75F@kevin-lewis-macbook.local> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3907 kevin.lewis@stripped 2012-05-23 [merge] Clean up and merge innodb_wl5980_linux.test modified: mysql-test/suite/innodb/r/innodb_wl5980_linux.result mysql-test/suite/innodb/t/innodb_wl5980_linux.test === added file 'mysql-test/suite/innodb/r/innodb_wl5980_linux.result' --- a/mysql-test/suite/innodb/r/innodb_wl5980_linux.result 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/innodb/r/innodb_wl5980_linux.result revid:kevin.lewis@stripped @@ -0,0 +1,150 @@ +# Skip this test other platfoms and run only on Linux. +# Set the environmental variables +# Stop server +# Copy the remote tablespace & DB zip files from suite location to working location. +# Check that the file exists in the working folder. +# Unzip the zip file. +# Remove the DOS based *.isl files from the MySql Data directory. +# Check that the *.ibd files are in the required location. +# Create new *.isl files with the correct path to the *.ibd files, +# Restart the DB server from unzip location Data Dir. +# Note that lower case option is required because the +# partition tables will be stored in mixed (Upper & Lower) format on Linux, +# but on windows the partition table names are stored in lower case only. +# Check the DB & tables with DML statements +use test; +SHOW CREATE TABLE emp1; +Table Create Table +emp1 CREATE TABLE `emp1` ( + `empno` int(11) DEFAULT NULL, + `ename` varchar(30) DEFAULT NULL, + `sal` decimal(3,0) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE emp2; +Table Create Table +emp2 CREATE TABLE `emp2` ( + `empno` int(11) DEFAULT NULL, + `ename` varchar(30) DEFAULT NULL, + `sal` decimal(3,0) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY HASH (empno) +(PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/tab1' ENGINE = InnoDB, + PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/tab2' ENGINE = InnoDB) */ +SHOW CREATE TABLE emp3; +Table Create Table +emp3 CREATE TABLE `emp3` ( + `empno` int(11) DEFAULT NULL, + `ename` varchar(30) DEFAULT NULL, + `sal` decimal(3,0) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/mysqld.5980/tab3/' +SHOW CREATE TABLE emp4; +Table Create Table +emp4 CREATE TABLE `emp4` ( + `empno` int(11) DEFAULT NULL, + `ename` varchar(30) DEFAULT NULL, + `sal` decimal(3,0) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +/*!50100 PARTITION BY HASH (empno) +(PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/tab4' ENGINE = InnoDB, + PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/tab5' ENGINE = InnoDB) */ +SHOW CREATE TABLE purchase; +Table Create Table +purchase CREATE TABLE `purchase` ( + `id` int(11) DEFAULT NULL, + `purchased` date DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE ( YEAR(purchased)) +SUBPARTITION BY HASH ( TO_DAYS(purchased)) +(PARTITION p0 VALUES LESS THAN (1990) + (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/part0' ENGINE = InnoDB, + SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/part1' ENGINE = InnoDB), + PARTITION p1 VALUES LESS THAN (2000) + (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/part2' ENGINE = InnoDB, + SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/part3' ENGINE = InnoDB)) */ +SELECT COUNT(*) FROM emp1; +COUNT(*) +2 +SELECT COUNT(*) FROM emp2; +COUNT(*) +2 +SELECT COUNT(*) FROM emp3; +COUNT(*) +2 +SELECT COUNT(*) FROM emp4; +COUNT(*) +2 +SELECT COUNT(*) FROM purchase; +COUNT(*) +1 +DELETE FROM emp1; +DELETE FROM emp2; +DELETE FROM emp3; +DELETE FROM emp4; +DELETE FROM purchase; +SELECT COUNT(*) FROM emp1; +COUNT(*) +0 +SELECT COUNT(*) FROM emp2; +COUNT(*) +0 +SELECT COUNT(*) FROM emp3; +COUNT(*) +0 +SELECT COUNT(*) FROM emp4; +COUNT(*) +0 +SELECT COUNT(*) FROM purchase; +COUNT(*) +0 +# Check the system tables have the proper entry of the tables. +SELECT path FROM information_schema.innodb_sys_datafiles order by path; +path +.\test\emp1.ibd +MYSQL_TMP_DIR/mysqld.5980/part0/test/purchase#p#p0#sp#s0.ibd +MYSQL_TMP_DIR/mysqld.5980/part1/test/purchase#p#p0#sp#s1.ibd +MYSQL_TMP_DIR/mysqld.5980/part2/test/purchase#p#p1#sp#s2.ibd +MYSQL_TMP_DIR/mysqld.5980/part3/test/purchase#p#p1#sp#s3.ibd +MYSQL_TMP_DIR/mysqld.5980/tab1/test/emp2#p#p1.ibd +MYSQL_TMP_DIR/mysqld.5980/tab2/test/emp2#p#p2.ibd +MYSQL_TMP_DIR/mysqld.5980/tab3/test/emp3.ibd +MYSQL_TMP_DIR/mysqld.5980/tab4/test/emp4#p#p1.ibd +MYSQL_TMP_DIR/mysqld.5980/tab5/test/emp4#p#p2.ibd +SELECT name,file_format,row_format FROM information_schema.innodb_sys_tablespaces ORDER BY name; +name file_format row_format +test/emp1 Antelope Compact or Redundant +test/emp2#p#p1 Antelope Compact or Redundant +test/emp2#p#p2 Antelope Compact or Redundant +test/emp3 Antelope Compact or Redundant +test/emp4#p#p1 Barracuda Dynamic +test/emp4#p#p2 Barracuda Dynamic +test/purchase#p#p0#sp#s0 Antelope Compact or Redundant +test/purchase#p#p0#sp#s1 Antelope Compact or Redundant +test/purchase#p#p1#sp#s2 Antelope Compact or Redundant +test/purchase#p#p1#sp#s3 Antelope Compact or Redundant +SELECT name,n_cols,file_format,row_format FROM information_schema.innodb_sys_tables WHERE name LIKE '%emp%' ORDER BY name; +name n_cols file_format row_format +test/emp1 6 Antelope Compact +test/emp2#p#p1 6 Antelope Compact +test/emp2#p#p2 6 Antelope Compact +test/emp3 6 Antelope Compact +test/emp4#p#p1 6 Barracuda Dynamic +test/emp4#p#p2 6 Barracuda Dynamic +SELECT name,n_cols,file_format,row_format FROM information_schema.innodb_sys_tables WHERE name LIKE '%purchase%' ORDER BY name; +name n_cols file_format row_format +test/purchase#p#p0#sp#s0 5 Antelope Compact +test/purchase#p#p0#sp#s1 5 Antelope Compact +test/purchase#p#p1#sp#s2 5 Antelope Compact +test/purchase#p#p1#sp#s3 5 Antelope Compact +# +# Cleanup +# +DROP TABLE emp1; +DROP TABLE emp2; +DROP TABLE emp3; +DROP TABLE emp4; +DROP TABLE purchase; +CREATE DATABASE mtr; +CREATE PROCEDURE mtr.check_warnings(OUT result INT) +BEGIN +SELECT 0 INTO RESULT; +END| === modified file 'mysql-test/suite/innodb/t/innodb_wl5980_linux.test' --- a/mysql-test/suite/innodb/t/innodb_wl5980_linux.test revid:viswanatham.gudipati@stripped +++ b/mysql-test/suite/innodb/t/innodb_wl5980_linux.test revid:kevin.lewis@stripped @@ -1,23 +1,23 @@ # -# This testcase is related to the WL5980,to test the portability feature -# create a DB & tables with all kinds Non-Partition & partition on Windows platform -# Zip the entire DB and tabelspaces on Windows -# Bring the zip file on to the Linux -# Unzip the DB and Modify the *.isl files with proper path of the *.ibd files. +# This testcase is related to WL5980, to test the portability feature. +# Create a DB & tables with all kinds Non-Partition & partition on Windows platform. +# Zip the entire DB and tablespaces on Windows. +# Bring the zip file on to Linux . +# Unzip the DB and modify the *.isl files with proper path of the *.ibd files. # Restart the DB & check the DB with few DML operations. -# Testing of Win DB on Linux platform. -# This script required "portability_wl5980_linux.zip" as prerequisite in location "suite/innodb/t" +# Test and validate the Windows DB on Linux platform. +# This script requires "portability_wl5980_linux.zip" as prerequisite in location "suite/innodb/t". --source include/have_innodb_16k.inc --source include/not_embedded.inc ---echo #Skip this test other platfoms and run only on Linux -if (`select convert(@@version_compile_os using latin1) IN ("Linux", "solaris10") = 0`) +--echo # Skip this test other platfoms and run only on Linux. +if (`select convert(@@version_compile_os using latin1) IN ("Linux", "solaris10", "osx10.6", "osx10.7") = 0`) { skip Need Linux; } ---echo #set the environmental variables +--echo # Set the environmental variables let $MYSQL_BASEDIR= `select @@basedir`; --echo # Stop server @@ -25,17 +25,16 @@ let $MYSQL_BASEDIR= `select @@basedir`; -- shutdown_server 30 -- source include/wait_until_disconnected.inc ---echo # Copy the Remote tablespace & DB zip files from suite location to working location +--echo # Copy the remote tablespace & DB zip files from suite location to working location. --copy_file $MYSQL_BASEDIR/mysql-test/suite/innodb/t/portability_wl5980_linux.zip $MYSQL_TMP_DIR/portability_wl5980_linux.zip -# check the file exist in the Working folder +--echo # Check that the file exists in the working folder. --file_exists $MYSQL_TMP_DIR/portability_wl5980_linux.zip ---echo # unzip the Zip file. +--echo # Unzip the zip file. --exec unzip -qo $MYSQL_TMP_DIR/portability_wl5980_linux.zip -d $MYSQL_TMP_DIR - ---echo # Remove the DOS based *.ISL files from the MySql Data directory +--echo # Remove the DOS based *.isl files from the MySql Data directory. --remove_file $MYSQL_TMP_DIR/mysqld.5980/data/test/emp2#p#p1.isl --remove_file $MYSQL_TMP_DIR/mysqld.5980/data/test/emp2#p#p2.isl @@ -49,7 +48,7 @@ let $MYSQL_BASEDIR= `select @@basedir`; --remove_file $MYSQL_TMP_DIR/mysqld.5980/data/test/purchase#p#p1#sp#s2.isl --remove_file $MYSQL_TMP_DIR/mysqld.5980/data/test/purchase#p#p1#sp#s3.isl ---echo #check for the *.ibd files are in the required location +--echo # Check that the *.ibd files are in the required location. --file_exists $MYSQL_TMP_DIR/mysqld.5980/tab1/test/emp2#p#p1.ibd --file_exists $MYSQL_TMP_DIR/mysqld.5980/tab2/test/emp2#p#p2.ibd @@ -64,7 +63,7 @@ let $MYSQL_BASEDIR= `select @@basedir`; --file_exists $MYSQL_TMP_DIR/mysqld.5980/part3/test/purchase#p#p1#sp#s3.ibd ---echo #Modify the path in the *.ISL files, for *.ibd files, for partition table and Non-Partition table & Antilop and Barracuda fileformats +--echo # Create new *.isl files with the correct path to the *.ibd files, --exec echo $MYSQL_TMP_DIR/mysqld.5980/tab1/test/emp2#p#p1.ibd > $MYSQL_TMP_DIR/mysqld.5980/data/test/emp2#p#p1.isl --exec echo $MYSQL_TMP_DIR/mysqld.5980/tab2/test/emp2#p#p2.ibd > $MYSQL_TMP_DIR/mysqld.5980/data/test/emp2#p#p2.isl @@ -73,22 +72,21 @@ let $MYSQL_BASEDIR= `select @@basedir`; --exec echo $MYSQL_TMP_DIR/mysqld.5980/tab4/test/emp4#p#p1.ibd > $MYSQL_TMP_DIR/mysqld.5980/data/test/emp4#p#p1.isl --exec echo $MYSQL_TMP_DIR/mysqld.5980/tab5/test/emp4#p#p2.ibd > $MYSQL_TMP_DIR/mysqld.5980/data/test/emp4#p#p2.isl - ---echo #Modify the path in the *.ISL files, for *.ibd files, for subpartition tables --exec echo $MYSQL_TMP_DIR/mysqld.5980/part0/test/purchase#p#p0#sp#s0.ibd > $MYSQL_TMP_DIR/mysqld.5980/data/test/purchase#p#p0#sp#s0.isl --exec echo $MYSQL_TMP_DIR/mysqld.5980/part1/test/purchase#p#p0#sp#s1.ibd > $MYSQL_TMP_DIR/mysqld.5980/data/test/purchase#p#p0#sp#s1.isl --exec echo $MYSQL_TMP_DIR/mysqld.5980/part2/test/purchase#p#p1#sp#s2.ibd > $MYSQL_TMP_DIR/mysqld.5980/data/test/purchase#p#p1#sp#s2.isl --exec echo $MYSQL_TMP_DIR/mysqld.5980/part3/test/purchase#p#p1#sp#s3.ibd > $MYSQL_TMP_DIR/mysqld.5980/data/test/purchase#p#p1#sp#s3.isl ---echo #Restart the DB server from unzip location Data Dir and Here lower case option is required becuase ---echo #the partition tables will be stored in mixed (Upper & Lower) format on Linux ,but on windows ---echo #the partition table names will be stored in lower case only. +--echo # Restart the DB server from unzip location Data Dir. +--echo # Note that lower case option is required because the +--echo # partition tables will be stored in mixed (Upper & Lower) format on Linux, +--echo # but on windows the partition table names are stored in lower case only. -- exec echo "restart:--lower_case_table_names=1 --datadir=$MYSQL_TMP_DIR/mysqld.5980/data/ " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -- enable_reconnect -- source include/wait_until_connected_again.inc ---echo #Check the DB & tables with DML statements +--echo # Check the DB & tables with DML statements use test; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE emp1; @@ -119,17 +117,16 @@ SELECT COUNT(*) FROM emp3; SELECT COUNT(*) FROM emp4; SELECT COUNT(*) FROM purchase; ---echo #Check the system tables have the entry of the tables proper . +--echo # Check the system tables have the proper entry of the tables. --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SELECT path FROM information_schema.innodb_sys_datafiles order by path; SELECT name,file_format,row_format FROM information_schema.innodb_sys_tablespaces ORDER BY name; SELECT name,n_cols,file_format,row_format FROM information_schema.innodb_sys_tables WHERE name LIKE '%emp%' ORDER BY name; SELECT name,n_cols,file_format,row_format FROM information_schema.innodb_sys_tables WHERE name LIKE '%purchase%' ORDER BY name; - - --echo # --echo # Cleanup +--echo # DROP TABLE emp1; DROP TABLE emp2; @@ -137,8 +134,9 @@ DROP TABLE emp3; DROP TABLE emp4; DROP TABLE purchase; -#The following lines of code just to dupe the MTR frame work nothing to do with WL, As MTR things that it was a failure, When the server logs contains error/warnings -#even though there are no result mismatch.It is an expected behavior of the server. +# The following lines of code just to dupe the MTR frame work nothing to do with WL, +# As MTR thinks that it was a failure, When the server logs contains error/warnings +# even though there are no result mismatch.It is an expected behavior of the server. CREATE DATABASE mtr; DELIMITER |; No bundle (reason: useless for push emails).