From: Mattias Jonsson Date: January 18 2011 10:55pm Subject: bzr commit into mysql-5.1 branch (mattias.jonsson:3551) Bug#59418 List-Archive: http://lists.mysql.com/commits/129112 X-Bug: 59418 Message-Id: <201101182256.p0IMuKNL007743@rcsinet15.oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0278119731==" --===============0278119731== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///C:/mysql-bzr/b59418-51/ based on revid:luis.soares@stripped 3551 Mattias Jonsson 2011-01-18 Bug#59418: parts suite have several failures with --embedded-server The test were using external tools not available for embedded. Fixed by rewriting the test to not rely on external tools like the mysql-client Also fixed some non portable --exec commands and replaced #p# to #P# to pass on windows. modified: mysql-test/suite/parts/inc/partition_check_drop.inc mysql-test/suite/parts/inc/partition_layout_check1.inc mysql-test/suite/parts/inc/partition_layout_check2.inc mysql-test/suite/parts/r/partition_recover_myisam.result mysql-test/suite/parts/t/partition_debug_sync_innodb.test mysql-test/suite/parts/t/partition_recover_myisam.test mysql-test/suite/parts/t/partition_special_innodb.test === modified file 'mysql-test/suite/parts/inc/partition_check_drop.inc' --- a/mysql-test/suite/parts/inc/partition_check_drop.inc 2008-08-04 05:04:47 +0000 +++ b/mysql-test/suite/parts/inc/partition_check_drop.inc 2011-01-18 22:55:39 +0000 @@ -66,10 +66,10 @@ if ($found_garbage) } # Do a manual cleanup, because the following tests should not suffer from # remaining files - --exec rm -f $MYSQLD_DATADIR/test/t1* || true + --remove_files_wildcard $MYSQLD_DATADIR/test t1* if ($with_directories) { - --exec rm -f $MYSQLTEST_VARDIR/tmp/t1* || true + --remove_files_wildcard $MYSQLTEST_VARDIR/tmp t1* } } --enable_query_log === modified file 'mysql-test/suite/parts/inc/partition_layout_check1.inc' --- a/mysql-test/suite/parts/inc/partition_layout_check1.inc 2009-02-01 12:00:48 +0000 +++ b/mysql-test/suite/parts/inc/partition_layout_check1.inc 2011-01-18 22:55:39 +0000 @@ -29,14 +29,10 @@ DELETE FROM t0_definition; let $MYSQLD_DATADIR= `select LEFT(@@datadir, LENGTH(@@datadir)-1)`; #echo MYSQLD_DATADIR: $MYSQLD_DATADIR; -# Dump the current definition of the table t1 to tmp1 -# This complicated method - let another mysqltest collect the output - is used -# because of two reasons +# Save the current definition of the table t1 # - SHOW CREATE TABLE t1 is at least currently most probably more reliable than # the corresponding SELECT on the INFORMATION_SCHEMA -# - SHOW CREATE TABLE .. cannot write its out put into a file like SELECT -let $show_file= $MYSQLD_DATADIR/test/tmp1; ---exec echo "SHOW CREATE TABLE t1; exit; " | $MYSQL_TEST > $show_file 2>&1 +let $show_create= `SHOW CREATE TABLE t1`; if ($do_file_tests) { # List the files belonging to the table t1 @@ -57,12 +53,13 @@ if (!$do_file_tests) # Insert the current definition of the table t1 into t0_definition eval INSERT INTO t0_definition SET state = 'old', - create_command = load_file('$show_file'), + create_command = "$show_create", file_list = @aux; # Print the create table statement into the protocol +# Added the concat to avoid changing the result files --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR '\r' '' -SELECT create_command FROM t0_definition WHERE state = 'old'; +SELECT concat('SHOW CREATE TABLE t1;\nTable\tCreate Table\n',create_command,'\n') as `create_command` FROM t0_definition WHERE state = 'old'; if ($do_file_tests) { # We stored the list of files, therefore printing the content makes sense === modified file 'mysql-test/suite/parts/inc/partition_layout_check2.inc' --- a/mysql-test/suite/parts/inc/partition_layout_check2.inc 2009-02-01 12:00:48 +0000 +++ b/mysql-test/suite/parts/inc/partition_layout_check2.inc 2011-01-18 22:55:39 +0000 @@ -28,9 +28,8 @@ DELETE FROM t0_definition WHERE state = let $MYSQLD_DATADIR= `select LEFT(@@datadir, LENGTH(@@datadir)-1)`; #echo MYSQLD_DATADIR: $MYSQLD_DATADIR; -# Dump the current definition of the table t1 to tmp1 -let $show_file= $MYSQLD_DATADIR/test/tmp1; ---exec echo "SHOW CREATE TABLE t1; exit; " | $MYSQL_TEST > $show_file 2>&1 +# Save the current definition of the table t1 +let $show_create= `SHOW CREATE TABLE t1`; if ($do_file_tests) { @@ -52,7 +51,7 @@ if (!$do_file_tests) # Insert the current definition of the table t1 into t0_definition eval INSERT INTO t0_definition SET state = 'new', - create_command = load_file('$show_file'), + create_command = "$show_create", file_list = @aux; # Print the old and new table layout, if they differ === modified file 'mysql-test/suite/parts/r/partition_recover_myisam.result' --- a/mysql-test/suite/parts/r/partition_recover_myisam.result 2009-08-29 21:29:47 +0000 +++ b/mysql-test/suite/parts/r/partition_recover_myisam.result 2011-01-18 22:55:39 +0000 @@ -1,4 +1,4 @@ -call mtr.add_suppression("./test/t1_will_crash"); +call mtr.add_suppression("t1_will_crash"); call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc"); CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM; INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11); === modified file 'mysql-test/suite/parts/t/partition_debug_sync_innodb.test' --- a/mysql-test/suite/parts/t/partition_debug_sync_innodb.test 2010-03-17 14:10:41 +0000 +++ b/mysql-test/suite/parts/t/partition_debug_sync_innodb.test 2011-01-18 22:55:39 +0000 @@ -14,6 +14,7 @@ partition by range (a) insert into t1 values (1), (11), (21), (33); SELECT * FROM t1; SHOW CREATE TABLE t1; +--replace_result #p# #P# --list_files $MYSQLD_DATADIR/test SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open'; @@ -36,6 +37,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p0 I disconnect con1; connection default; --reap +--replace_result #p# #P# --list_files $MYSQLD_DATADIR/test SHOW CREATE TABLE t1; SELECT * FROM t1; === modified file 'mysql-test/suite/parts/t/partition_recover_myisam.test' --- a/mysql-test/suite/parts/t/partition_recover_myisam.test 2009-08-29 21:29:47 +0000 +++ b/mysql-test/suite/parts/t/partition_recover_myisam.test 2011-01-18 22:55:39 +0000 @@ -1,6 +1,6 @@ # test the auto-recover (--myisam-recover) of partitioned myisam tables -call mtr.add_suppression("./test/t1_will_crash"); +call mtr.add_suppression("t1_will_crash"); call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc"); --source include/have_partition.inc @@ -20,6 +20,8 @@ FLUSH TABLES; let $MYSQLD_DATADIR= `select @@datadir`; --remove_file $MYSQLD_DATADIR/test/t1_will_crash.MYI --copy_file std_data/corrupt_t1.MYI $MYSQLD_DATADIR/test/t1_will_crash.MYI +--replace_result \\ / +--replace_regex /Table '.*data/Table './ SELECT * FROM t1_will_crash; DROP TABLE t1_will_crash; CREATE TABLE t1_will_crash (a INT, KEY (a)) @@ -33,5 +35,7 @@ FLUSH TABLES; --echo # head -c1024 t1#P#p1.MYI > corrupt_t1#P#p1.MYI --remove_file $MYSQLD_DATADIR/test/t1_will_crash#P#p1.MYI --copy_file std_data/corrupt_t1#P#p1.MYI $MYSQLD_DATADIR/test/t1_will_crash#P#p1.MYI +--replace_result \\ / +--replace_regex /Table '.*data/Table './ SELECT * FROM t1_will_crash; DROP TABLE t1_will_crash; === modified file 'mysql-test/suite/parts/t/partition_special_innodb.test' --- a/mysql-test/suite/parts/t/partition_special_innodb.test 2008-12-04 09:47:25 +0000 +++ b/mysql-test/suite/parts/t/partition_special_innodb.test 2011-01-18 22:55:39 +0000 @@ -58,8 +58,8 @@ ENGINE = InnoDB PARTITION BY HASH (a) PARTITIONS 2; -connect (con1,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (con2,127.0.0.1,root,,test,$MASTER_MYPORT,); +connect (con1, localhost, root,,); +connect (con2, localhost, root,,); --connection con1 SET autocommit=OFF; --===============0278119731== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/mattias.jonsson@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: mattias.jonsson@stripped\ # a91bgx97kvmwfm26 # target_branch: file:///C:/mysql-bzr/b59418-51/ # testament_sha1: 310130999f7cf246b19d9677be635cd3dfd72e7e # timestamp: 2011-01-18 23:55:45 +0100 # base_revision_id: luis.soares@stripped\ # 82kaxaq975qkd8i2 # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWWttIXsABabfgCCQXPf//392 /aT////wYAtXB3fdPoDSgApbmzgroHQ6C2KGgAZTUyptM0mpvUmTTNT9UbUyPUNMQAGgBhM0hEnl IGTNID0mgAGQABiABo0AGlTTepPSeiAGmhoAANAA0AAAAlNECTVHplPU8BJ+oJoZA0NDQDTIAAES lGTVNqbypvSmmnoymhpp6R6gBk9Q9I2oDTQAkkJo0BMTTTQCDTSYp6T1EaA9QekAaZCNCv4RLnJN NVaZ0CDIkSYGQAwpMh3owfBOwEBLsJiBiODjiBY3NVsteCrrCdKoZmRLJAxK835kUzxfKWKVHvrK 6ici610WnUrm4NjBALiNRo2nxZHSE3MXzlb3nCzbTqG7AyEkhCBkgSPv9WAhXuXmbXBng01DUlE1 oWuHsrWk0ncqqpLXitAkSTocSRCKKJOFE6XWzmbT0N1bYOZp1zGwoYRu3mm3QgYrwevcyI11K31R LNoICtEifKoSEMLEWEzYSusAEJD9bo8qxDpYYAKoJqIdvQFWoQquGQVmvmM70vvGG8lyYtDJ/6Oc N39Uqr8utd0/mfInPFIpZAH6j6lh7JncJAYCNogwtwRI0O3f9FihgeYg3YsX0HK3N58g2jC0bAyB 57hAXMYBYLRcRB3Hg1QfgU30qAUGKXHLoBOpAVkfP1sH5hVGYuuFiJHlbu2PQiY3aM6jOcCnUV34 14l+5x7ZDBYDIgeGMlKUAu01reQgKgEXFAOEJ4kTyyNoDiqpMO40UQK4jk4LyIRAjECJxJnipBgr CYRFcO/3iEjUYycVlpGmeoYKoYICfU6DCe4yn87nKhUoRc/euXdFJGDK4uThBNG6k16w1gYFsqcb JQzlqmronVIfQnZPJzNA5bYKk5X6i2sKzElLKa24e8+e4hVCeMpjjheIIFRmQ6TuKM8yRwzSYHlI g0IGsdmlSbp3gUHf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