List:Commits« Previous MessageNext Message »
From:Matthias Leich Date:May 11 2010 10:48am
Subject:bzr commit into mysql-5.1-bugteam branch (matthias.leich:3378) WL#5356
View as plain text  
#At file:///work2/5.1/mysql-5.1-bugteam-5356/ based on revid:matthias.leich@stripped

 3378 Matthias Leich	2010-05-11
      WL#5356 Speed up specific MTR test that will be part of the MATs test suite
      
      This changeset equals the reviewed
         http://lists.mysql.com/commits/107110
      except that there are two additional and necessary adjustments in
         mysql-test/t/merge.test
      for runs with the embedded server.
     @ mysql-test/include/deadlock.inc
        Replace "sleeps" with "wait_condition"
     @ mysql-test/include/index_merge_ror.inc
        Optimize the data loading loops for minimum runtime
     @ mysql-test/include/index_merge_ror_cpk.inc
        Optimize the data loading loops for minimum runtime
     @ mysql-test/include/mix1.inc
        - Remove two redundant calls of include/innodb_rollback_on_timeout.inc.
        - The third call of this routine gets shifted into its own test
          (innodb_timeout_rollback1)
        - Replace error numbers by error names
        - Replace "sleep 5" by "real_sleep 1.01"
     @ mysql-test/r/func_time.result
        Updated results
     @ mysql-test/r/index_merge_innodb.result
        Updated results
     @ mysql-test/r/index_merge_myisam.result
        Updated results
     @ mysql-test/r/innodb_mysql.result
        Updated results
     @ mysql-test/r/mysqltest.result
        Updated results
     @ mysql-test/t/func_time.test
        - Replace "sleep(2)" by "sleep(1.1)"
        - Replace error numbers by error names
     @ mysql-test/t/innodb_timeout_rollback1.test
        This new separate test replaces the call to include/innodb_rollback_on_timeout.inc
        within include/mix1.inc.
     @ mysql-test/t/merge.test
        - Replace error numbers by error name
        - Replace "sleep 1" by "wait_condition" except when running with embedded server
     @ mysql-test/t/mysqltest.test
        - Improve the check for "trailing # comment"
        - reduce the sleep values
     @ mysql-test/t/partition_innodb_semi_consistent-master.opt
        Reduce the timeout value
     @ mysql-test/t/sp.test
        Replace "sleep 2" by "real_sleep 1.01"
     @ mysql-test/t/subselect.test
        Optimize data loading loops

    added:
      mysql-test/r/innodb_timeout_rollback1.result
      mysql-test/t/innodb_timeout_rollback1-master.opt
      mysql-test/t/innodb_timeout_rollback1.test
    modified:
      mysql-test/include/deadlock.inc
      mysql-test/include/index_merge_ror.inc
      mysql-test/include/index_merge_ror_cpk.inc
      mysql-test/include/mix1.inc
      mysql-test/r/func_time.result
      mysql-test/r/index_merge_innodb.result
      mysql-test/r/index_merge_myisam.result
      mysql-test/r/innodb_mysql.result
      mysql-test/r/mysqltest.result
      mysql-test/t/func_time.test
      mysql-test/t/merge.test
      mysql-test/t/mysqltest.test
      mysql-test/t/partition_innodb_semi_consistent-master.opt
      mysql-test/t/sp.test
      mysql-test/t/subselect.test
=== modified file 'mysql-test/include/deadlock.inc'
--- a/mysql-test/include/deadlock.inc	2007-08-27 13:19:58 +0000
+++ b/mysql-test/include/deadlock.inc	2010-05-11 10:48:05 +0000
@@ -5,9 +5,7 @@
 # has to be set before sourcing this script.
 #
 # Last update:
-# 2006-07-26 ML refactoring + print when connection is switched
-#               old name was t/innodb-deadlock.test
-#               main code went into include/deadlock.inc
+# 2010-04-29 mleich   wait routines insetad od sleeps
 #
 
 --echo # Establish connection con1 (user=root)
@@ -37,10 +35,19 @@ set autocommit=0;
 # The following query should hang because con1 is locking the record
 --send
 update t1 set x=2 where id = 0;
---sleep 2
 
 --echo # Switch to connection con1
 connection con1;
+# Wait till it is revealed that the update of connection con2 hangs.
+# Criteria:
+# - We find the update within the processlist
+# - time >= 1 because a non hanging update would most probably never
+#   reach time = 1
+let $wait_condition=
+SELECT COUNT(*) = 1 FROM information_schema.processlist
+WHERE state = 'Updating' AND info = 'update t1 set x=2 where id = 0' AND time >= 1;
+--source include/wait_condition.inc
+
 update t1 set x=1 where id = 0;
 select * from t1;
 commit;
@@ -80,10 +87,18 @@ set autocommit=0;
 # The following query should hang because con1 is locking the record
 --send
 update t1 set x=2 where id = 0;
---sleep 2
 
 --echo # Switch to connection con1
 connection con1;
+# Wait till it is revealed that the update of connection con2 hangs.
+# Criteria:
+# - We find the update within the processlist
+# - time >= 1 because a non hanging update would most probably never
+#   reach time = 1
+let $wait_condition=
+SELECT COUNT(*) = 1 FROM information_schema.processlist
+WHERE state = 'Updating' AND info = 'update t1 set x=2 where id = 0' AND time >= 1;
+--source include/wait_condition.inc
 update t1 set x=1 where id = 0;
 select * from t1;
 commit;
@@ -119,10 +134,18 @@ update t2 set a=2 where b = 0;
 select * from t2;
 --send
 update t1 set x=2 where id = 0;
---sleep 2
 
 --echo # Switch to connection con1
 connection con1;
+# Wait till it is revealed that the update of connection con2 hangs.
+# Criteria:
+# - We find the update within the processlist
+# - time >= 1 because a non hanging update would most probably never
+#   reach time = 1
+let $wait_condition=
+SELECT COUNT(*) = 1 FROM information_schema.processlist
+WHERE state = 'Updating' AND info = 'update t1 set x=2 where id = 0' AND time >= 1;
+--source include/wait_condition.inc
 update t1 set x=1 where id = 0;
 select * from t1;
 commit;

=== modified file 'mysql-test/include/index_merge_ror.inc'
--- a/mysql-test/include/index_merge_ror.inc	2006-12-26 14:04:31 +0000
+++ b/mysql-test/include/index_merge_ror.inc	2010-05-11 10:48:05 +0000
@@ -10,9 +10,7 @@
 #       They might be not valid for other storage engines.
 #
 # Last update:
-# 2006-08-02 ML test refactored
-#               old name was t/index_merge_ror.test
-#               main code went into include/index_merge_ror.inc
+# 2010-04-29 mleich Optimize the data loading loops
 #
 
 --echo #---------------- ROR-index_merge tests -----------------------
@@ -68,10 +66,21 @@ create table t1
 create table t0 as select * from t1;
 --disable_query_log
 --echo # Printing of many insert into t0 values (....) disabled.
-let $cnt=1000;
+# mleich: The data loading loop is already optimized for minimum runtime.
+#         Please do not modify it.
+let $cnt=100;
 while ($cnt)
 {
-  eval insert into t0 values (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6');
+  insert into t0 values (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6'),
+                        (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6');
   dec $cnt;
 }
 --enable_query_log
@@ -101,16 +110,38 @@ while ($1)
 # -1 is used for values 'out of any range we are using'
 # insert enough rows for index intersection to be used for (key1,key2)
 insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 100, 100,'key1-key2-key3-key4');
-let $cnt=400;
+# mleich: The data loading loop is already optimized for minimum runtime.
+#         Please do not modify it.
+let $cnt=40;
 while ($cnt)
 {
-  eval insert into t1 (key1, key2, key3, key4, filler1) values (100, -1, 100, -1,'key1-key3');
+  insert into t1 (key1, key2, key3, key4, filler1) values (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3'),
+                                                          (100, -1, 100, -1,'key1-key3');
   dec $cnt;
 }
-let $cnt=400;
+# mleich: The data loading loop is already optimized for minimum runtime.
+#         Please do not modify it.
+let $cnt=40;
 while ($cnt)
 {
-  eval insert into t1 (key1, key2, key3, key4, filler1) values (-1, 100, -1, 100,'key2-key4');
+  insert into t1 (key1, key2, key3, key4, filler1) values (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4'),
+                                                          (-1, 100, -1, 100,'key2-key4');
   dec $cnt;
 }
 --enable_query_log

=== modified file 'mysql-test/include/index_merge_ror_cpk.inc'
--- a/mysql-test/include/index_merge_ror_cpk.inc	2006-08-16 12:58:49 +0000
+++ b/mysql-test/include/index_merge_ror_cpk.inc	2010-05-11 10:48:05 +0000
@@ -57,10 +57,32 @@ create table t1
 
 --disable_query_log
 set autocommit=0;
-let $1=10000;
+# mleich: The data loading loop is optimized for minimum runtime.
+#         Please do not modify it.
+let $1=1000;
 while ($1)
 {
-  eval insert into t1 values ($1 div 10,$1 mod 100,   $1/100,$1/100,   $1/100,$1/100,$1/100,$1/100,$1/100, $1 mod 100, $1/1000,'filler-data-$1','filler2');
+eval insert into t1 values
+(($1 * 10 - 0) div 10,($1 * 10 - 0) mod 100,($1 * 10 - 0)/100,($1 * 10 - 0)/100, ($1 * 10 - 0)/100,($1 * 10 - 0)/100,
+ ($1 * 10 - 0)/100,($1 * 10 - 0)/100,($1 * 10 - 0)/100, ($1 * 10 - 0) mod 100, ($1 * 10 - 0)/1000,'filler-data-$1_9','filler2'),
+(($1 * 10 - 1) div 10,($1 * 10 - 1) mod 100,($1 * 10 - 1)/100,($1 * 10 - 1)/100, ($1 * 10 - 1)/100,($1 * 10 - 1)/100,
+ ($1 * 10 - 1)/100,($1 * 10 - 1)/100,($1 * 10 - 1)/100, ($1 * 10 - 1) mod 100, ($1 * 10 - 1)/1000,'filler-data-$1_8','filler2'),
+(($1 * 10 - 2) div 10,($1 * 10 - 2) mod 100,($1 * 10 - 2)/100,($1 * 10 - 2)/100, ($1 * 10 - 2)/100,($1 * 10 - 2)/100,
+ ($1 * 10 - 2)/100,($1 * 10 - 2)/100,($1 * 10 - 2)/100, ($1 * 10 - 2) mod 100, ($1 * 10 - 2)/1000,'filler-data-$1_7','filler2'),
+(($1 * 10 - 3) div 10,($1 * 10 - 3) mod 100,($1 * 10 - 3)/100,($1 * 10 - 3)/100, ($1 * 10 - 3)/100,($1 * 10 - 3)/100,
+ ($1 * 10 - 3)/100,($1 * 10 - 3)/100,($1 * 10 - 3)/100, ($1 * 10 - 3) mod 100, ($1 * 10 - 3)/1000,'filler-data-$1_6','filler2'),
+(($1 * 10 - 4) div 10,($1 * 10 - 4) mod 100,($1 * 10 - 4)/100,($1 * 10 - 4)/100, ($1 * 10 - 4)/100,($1 * 10 - 4)/100,
+ ($1 * 10 - 4)/100,($1 * 10 - 4)/100,($1 * 10 - 4)/100, ($1 * 10 - 4) mod 100, ($1 * 10 - 4)/1000,'filler-data-$1_5','filler2'),
+(($1 * 10 - 5) div 10,($1 * 10 - 5) mod 100,($1 * 10 - 5)/100,($1 * 10 - 5)/100, ($1 * 10 - 5)/100,($1 * 10 - 5)/100,
+ ($1 * 10 - 5)/100,($1 * 10 - 5)/100,($1 * 10 - 5)/100, ($1 * 10 - 5) mod 100, ($1 * 10 - 5)/1000,'filler-data-$1_4','filler2'),
+(($1 * 10 - 6) div 10,($1 * 10 - 6) mod 100,($1 * 10 - 6)/100,($1 * 10 - 6)/100, ($1 * 10 - 6)/100,($1 * 10 - 6)/100,
+ ($1 * 10 - 6)/100,($1 * 10 - 6)/100,($1 * 10 - 6)/100, ($1 * 10 - 6) mod 100, ($1 * 10 - 6)/1000,'filler-data-$1_3','filler2'),
+(($1 * 10 - 7) div 10,($1 * 10 - 7) mod 100,($1 * 10 - 7)/100,($1 * 10 - 7)/100, ($1 * 10 - 7)/100,($1 * 10 - 7)/100,
+ ($1 * 10 - 7)/100,($1 * 10 - 7)/100,($1 * 10 - 7)/100, ($1 * 10 - 7) mod 100, ($1 * 10 - 7)/1000,'filler-data-$1_2','filler2'),
+(($1 * 10 - 8) div 10,($1 * 10 - 8) mod 100,($1 * 10 - 8)/100,($1 * 10 - 8)/100, ($1 * 10 - 8)/100,($1 * 10 - 8)/100,
+ ($1 * 10 - 8)/100,($1 * 10 - 8)/100,($1 * 10 - 8)/100, ($1 * 10 - 8) mod 100, ($1 * 10 - 8)/1000,'filler-data-$1_1','filler2'),
+(($1 * 10 - 9) div 10,($1 * 10 - 9) mod 100,($1 * 10 - 9)/100,($1 * 10 - 9)/100, ($1 * 10 - 9)/100,($1 * 10 - 9)/100,
+ ($1 * 10 - 9)/100,($1 * 10 - 9)/100,($1 * 10 - 9)/100, ($1 * 10 - 9) mod 100, ($1 * 10 - 9)/1000,'filler-data-$1_0','filler2');
   dec $1;
 }
 set autocommit=1;

=== modified file 'mysql-test/include/mix1.inc'
--- a/mysql-test/include/mix1.inc	2009-10-05 13:16:27 +0000
+++ b/mysql-test/include/mix1.inc	2010-05-11 10:48:05 +0000
@@ -449,8 +449,6 @@ SELECT DISTINCT t1.name, t1.dept FROM t1
 
 DROP TABLE t1;
 
---source include/innodb_rollback_on_timeout.inc
-
 #
 # Bug #27210: INNODB ON DUPLICATE KEY UPDATE
 #
@@ -481,7 +479,6 @@ drop table test;
 set global query_cache_type=@save_qcache_type;
 set global query_cache_size=@save_qcache_size;
 
---source include/innodb_rollback_on_timeout.inc
 
 #
 # Bug #27650: INSERT fails after multi-row INSERT of the form:
@@ -627,10 +624,10 @@ DROP TABLE t1,t2,t3;
 create table t1 (a int) engine=innodb;
 let $MYSQLD_DATADIR= `select @@datadir`;
 copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/bug29807.frm;
---error 1146
+--error ER_NO_SUCH_TABLE
 select * from bug29807;
 drop table t1;
---error 1051
+--error ER_BAD_TABLE_ERROR
 drop table bug29807;
 create table bug29807 (a int);
 drop table bug29807;
@@ -800,7 +797,6 @@ EXPLAIN SELECT b, SUM(c) FROM t1 GROUP B
 EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
 DROP TABLE t1;
 
---source include/innodb_rollback_on_timeout.inc
 
 #
 # Bug#27296 Assertion in ALTER TABLE SET DEFAULT in Linux Debug build
@@ -1143,25 +1139,25 @@ DROP TABLE t1;
 BEGIN;
 SAVEPOINT s1;
 COMMIT;
---error 1305
+--error ER_SP_DOES_NOT_EXIST
 RELEASE SAVEPOINT s1;
 
 BEGIN;
 SAVEPOINT s2;
 COMMIT;
---error 1305
+--error ER_SP_DOES_NOT_EXIST
 ROLLBACK TO SAVEPOINT s2;
 
 BEGIN;
 SAVEPOINT s3;
 ROLLBACK;
---error 1305
+--error ER_SP_DOES_NOT_EXIST
 RELEASE SAVEPOINT s3;
 
 BEGIN;
 SAVEPOINT s4;
 ROLLBACK;
---error 1305
+--error ER_SP_DOES_NOT_EXIST
 ROLLBACK TO SAVEPOINT s4;
 
 #
@@ -1293,17 +1289,17 @@ create table t1(f1 varchar(5) unique, f2
 insert into t1(f1) values(1);
 --replace_column 1 #
 select @a:=f2 from t1;
---sleep 5
+--real_sleep 1.01
 update t1 set f1=1;
 --replace_column 1 #
 select @b:=f2 from t1;
 select if(@a=@b,"ok","wrong");
---sleep 5
+--real_sleep 1.01
 insert into t1(f1) values (1) on duplicate key update f1="1";
 --replace_column 1 #
 select @b:=f2 from t1;
 select if(@a=@b,"ok","wrong");
---sleep 5
+--real_sleep 1.01
 insert into t1(f1) select f1 from t1 on duplicate key update f1="1";
 --replace_column 1 #
 select @b:=f2 from t1;

=== modified file 'mysql-test/r/func_time.result'
--- a/mysql-test/r/func_time.result	2010-02-09 10:30:50 +0000
+++ b/mysql-test/r/func_time.result	2010-05-11 10:48:05 +0000
@@ -1100,7 +1100,7 @@ b timestamp default '2005-05-05 01:01:01
 drop function if exists t_slow_sysdate;
 create function t_slow_sysdate() returns timestamp
 begin
-do sleep(2);
+do sleep(1.1);
 return sysdate();
 end;
 //
@@ -1128,7 +1128,7 @@ drop table t1;
 create procedure t_sysdate()
 begin
 select sysdate() into @a;
-do sleep(2);
+do sleep(1.1);
 select sysdate() into @b;
 select @a != @b;
 end;

=== modified file 'mysql-test/r/index_merge_innodb.result'
--- a/mysql-test/r/index_merge_innodb.result	2006-09-18 14:55:56 +0000
+++ b/mysql-test/r/index_merge_innodb.result	2010-05-11 10:48:05 +0000
@@ -495,16 +495,16 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t1	range	PRIMARY,key1	PRIMARY	8	NULL	9	Using where
 select * from t1 where pk1 = 1 and pk2 < 80  and key1=0;
 pk1	pk2	key1	key2	pktail1ok	pktail2ok	pktail3bad	pktail4bad	pktail5bad	pk2copy	badkey	filler1	filler2
-1	10	0	0	0	0	0	0	0	10	0	filler-data-10	filler2
-1	11	0	0	0	0	0	0	0	11	0	filler-data-11	filler2
-1	12	0	0	0	0	0	0	0	12	0	filler-data-12	filler2
-1	13	0	0	0	0	0	0	0	13	0	filler-data-13	filler2
-1	14	0	0	0	0	0	0	0	14	0	filler-data-14	filler2
-1	15	0	0	0	0	0	0	0	15	0	filler-data-15	filler2
-1	16	0	0	0	0	0	0	0	16	0	filler-data-16	filler2
-1	17	0	0	0	0	0	0	0	17	0	filler-data-17	filler2
-1	18	0	0	0	0	0	0	0	18	0	filler-data-18	filler2
-1	19	0	0	0	0	0	0	0	19	0	filler-data-19	filler2
+1	10	0	0	0	0	0	0	0	10	0	filler-data-1_9	filler2
+1	11	0	0	0	0	0	0	0	11	0	filler-data-2_0	filler2
+1	12	0	0	0	0	0	0	0	12	0	filler-data-2_1	filler2
+1	13	0	0	0	0	0	0	0	13	0	filler-data-2_2	filler2
+1	14	0	0	0	0	0	0	0	14	0	filler-data-2_3	filler2
+1	15	0	0	0	0	0	0	0	15	0	filler-data-2_4	filler2
+1	16	0	0	0	0	0	0	0	16	0	filler-data-2_5	filler2
+1	17	0	0	0	0	0	0	0	17	0	filler-data-2_6	filler2
+1	18	0	0	0	0	0	0	0	18	0	filler-data-2_7	filler2
+1	19	0	0	0	0	0	0	0	19	0	filler-data-2_8	filler2
 explain select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	index_merge	key1,key2	key1,key2	4,4	NULL	1	Using intersect(key1,key2); Using where; Using index

=== modified file 'mysql-test/r/index_merge_myisam.result'
--- a/mysql-test/r/index_merge_myisam.result	2009-06-15 14:36:51 +0000
+++ b/mysql-test/r/index_merge_myisam.result	2010-05-11 10:48:05 +0000
@@ -1329,16 +1329,16 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t1	range	PRIMARY,key1	PRIMARY	8	NULL	7	Using where
 select * from t1 where pk1 = 1 and pk2 < 80  and key1=0;
 pk1	pk2	key1	key2	pktail1ok	pktail2ok	pktail3bad	pktail4bad	pktail5bad	pk2copy	badkey	filler1	filler2
-1	10	0	0	0	0	0	0	0	10	0	filler-data-10	filler2
-1	11	0	0	0	0	0	0	0	11	0	filler-data-11	filler2
-1	12	0	0	0	0	0	0	0	12	0	filler-data-12	filler2
-1	13	0	0	0	0	0	0	0	13	0	filler-data-13	filler2
-1	14	0	0	0	0	0	0	0	14	0	filler-data-14	filler2
-1	15	0	0	0	0	0	0	0	15	0	filler-data-15	filler2
-1	16	0	0	0	0	0	0	0	16	0	filler-data-16	filler2
-1	17	0	0	0	0	0	0	0	17	0	filler-data-17	filler2
-1	18	0	0	0	0	0	0	0	18	0	filler-data-18	filler2
-1	19	0	0	0	0	0	0	0	19	0	filler-data-19	filler2
+1	10	0	0	0	0	0	0	0	10	0	filler-data-1_9	filler2
+1	11	0	0	0	0	0	0	0	11	0	filler-data-2_0	filler2
+1	12	0	0	0	0	0	0	0	12	0	filler-data-2_1	filler2
+1	13	0	0	0	0	0	0	0	13	0	filler-data-2_2	filler2
+1	14	0	0	0	0	0	0	0	14	0	filler-data-2_3	filler2
+1	15	0	0	0	0	0	0	0	15	0	filler-data-2_4	filler2
+1	16	0	0	0	0	0	0	0	16	0	filler-data-2_5	filler2
+1	17	0	0	0	0	0	0	0	17	0	filler-data-2_6	filler2
+1	18	0	0	0	0	0	0	0	18	0	filler-data-2_7	filler2
+1	19	0	0	0	0	0	0	0	19	0	filler-data-2_8	filler2
 explain select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	index_merge	key1,key2	key1,key2	4,4	NULL	1	Using intersect(key1,key2); Using where

=== modified file 'mysql-test/r/innodb_mysql.result'
--- a/mysql-test/r/innodb_mysql.result	2010-05-07 05:38:42 +0000
+++ b/mysql-test/r/innodb_mysql.result	2010-05-11 10:48:05 +0000
@@ -392,43 +392,6 @@ id	select_type	table	type	possible_keys
 SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
 name	dept
 DROP TABLE t1;
-drop table if exists t1;
-show variables like 'innodb_rollback_on_timeout';
-Variable_name	Value
-innodb_rollback_on_timeout	OFF
-create table t1 (a int unsigned not null primary key) engine = innodb;
-insert into t1 values (1);
-commit;
-begin work;
-insert into t1 values (2);
-select * from t1;
-a
-1
-2
-begin work;
-insert into t1 values (5);
-select * from t1;
-a
-1
-5
-insert into t1 values (2);
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-select * from t1;
-a
-1
-5
-commit;
-select * from t1;
-a
-1
-2
-commit;
-select * from t1;
-a
-1
-2
-5
-drop table t1;
 set @save_qcache_size=@@global.query_cache_size;
 set @save_qcache_type=@@global.query_cache_type;
 set global query_cache_size=10*1024*1024;
@@ -455,43 +418,6 @@ tes	1234
 drop table test;
 set global query_cache_type=@save_qcache_type;
 set global query_cache_size=@save_qcache_size;
-drop table if exists t1;
-show variables like 'innodb_rollback_on_timeout';
-Variable_name	Value
-innodb_rollback_on_timeout	OFF
-create table t1 (a int unsigned not null primary key) engine = innodb;
-insert into t1 values (1);
-commit;
-begin work;
-insert into t1 values (2);
-select * from t1;
-a
-1
-2
-begin work;
-insert into t1 values (5);
-select * from t1;
-a
-1
-5
-insert into t1 values (2);
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-select * from t1;
-a
-1
-5
-commit;
-select * from t1;
-a
-1
-2
-commit;
-select * from t1;
-a
-1
-2
-5
-drop table t1;
 create table t1(
 id int auto_increment,
 c char(1) not null,
@@ -784,43 +710,6 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	128	Using filesort
 DROP TABLE t1;
 drop table if exists t1;
-show variables like 'innodb_rollback_on_timeout';
-Variable_name	Value
-innodb_rollback_on_timeout	OFF
-create table t1 (a int unsigned not null primary key) engine = innodb;
-insert into t1 values (1);
-commit;
-begin work;
-insert into t1 values (2);
-select * from t1;
-a
-1
-2
-begin work;
-insert into t1 values (5);
-select * from t1;
-a
-1
-5
-insert into t1 values (2);
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-select * from t1;
-a
-1
-5
-commit;
-select * from t1;
-a
-1
-2
-commit;
-select * from t1;
-a
-1
-2
-5
-drop table t1;
-drop table if exists t1;
 create table t1 (a int) engine=innodb;
 alter table t1 alter a set default 1;
 drop table t1;

=== added file 'mysql-test/r/innodb_timeout_rollback1.result'
--- a/mysql-test/r/innodb_timeout_rollback1.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/innodb_timeout_rollback1.result	2010-05-11 10:48:05 +0000
@@ -0,0 +1,38 @@
+drop table if exists t1;
+show variables like 'innodb_rollback_on_timeout';
+Variable_name	Value
+innodb_rollback_on_timeout	OFF
+create table t1 (a int unsigned not null primary key) engine = innodb;
+insert into t1 values (1);
+commit;
+begin work;
+insert into t1 values (2);
+select * from t1;
+a
+1
+2
+begin work;
+insert into t1 values (5);
+select * from t1;
+a
+1
+5
+insert into t1 values (2);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+select * from t1;
+a
+1
+5
+commit;
+select * from t1;
+a
+1
+2
+commit;
+select * from t1;
+a
+1
+2
+5
+drop table t1;
+End of 5.0 tests

=== modified file 'mysql-test/r/mysqltest.result'
--- a/mysql-test/r/mysqltest.result	2010-02-09 17:13:57 +0000
+++ b/mysql-test/r/mysqltest.result	2010-05-11 10:48:05 +0000
@@ -177,6 +177,8 @@ mysqltest: At line 1: End of line junk d
 "
 mysqltest: At line 1: Extra delimiter ";" found
 mysqltest: At line 1: Extra delimiter ";" found
+SET @aux = 1 ;
+SET @aux = 1 ;
 mysqltest: At line 1: Missing argument(s) to 'error'
 mysqltest: At line 1: Missing argument(s) to 'error'
 mysqltest: At line 1: The sqlstate definition must start with an uppercase S

=== modified file 'mysql-test/t/func_time.test'
--- a/mysql-test/t/func_time.test	2009-01-23 12:22:05 +0000
+++ b/mysql-test/t/func_time.test	2010-05-11 10:48:05 +0000
@@ -624,7 +624,7 @@ delimiter //;
 drop function if exists t_slow_sysdate;
 create function t_slow_sysdate() returns timestamp
 begin
-  do sleep(2);
+  do sleep(1.1);
   return sysdate();
 end;
 //
@@ -658,7 +658,7 @@ delimiter //;
 create procedure t_sysdate()
 begin
   select sysdate() into @a;
-  do sleep(2);
+  do sleep(1.1);
   select sysdate() into @b;
   select @a != @b;
 end;
@@ -768,14 +768,14 @@ insert into t1 values ('070514-000000');
 select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
 # Error for swe7: it is not ASCII compatible
 set names swe7;
---error 1267
+--error ER_CANT_AGGREGATE_2COLLATIONS
 select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
 set names latin1;
 # Conversion of date_format() result to ASCII
 # is not safe with the non-default locale fr_FR
 # because month and day names can have accented characters
 set lc_time_names=fr_FR;
---error 1267
+--error ER_CANT_AGGREGATE_2COLLATIONS
 select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
 set lc_time_names=en_US;
 drop table t1;

=== added file 'mysql-test/t/innodb_timeout_rollback1-master.opt'
--- a/mysql-test/t/innodb_timeout_rollback1-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/innodb_timeout_rollback1-master.opt	2010-05-11 10:48:05 +0000
@@ -0,0 +1 @@
+--innodb_lock_wait_timeout=1

=== added file 'mysql-test/t/innodb_timeout_rollback1.test'
--- a/mysql-test/t/innodb_timeout_rollback1.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/innodb_timeout_rollback1.test	2010-05-11 10:48:05 +0000
@@ -0,0 +1,6 @@
+# Check impact of server variable innodb_rollback_on_timeout = OFF
+--source include/have_innodb.inc
+
+--source include/innodb_rollback_on_timeout.inc
+
+--echo End of 5.0 tests

=== modified file 'mysql-test/t/merge.test'
--- a/mysql-test/t/merge.test	2010-03-19 06:01:02 +0000
+++ b/mysql-test/t/merge.test	2010-05-11 10:48:05 +0000
@@ -49,12 +49,12 @@ show create table t3;
 
 # The following should give errors
 create table t4 (a int not null, b char(10), key(a)) engine=MERGE UNION=(t1,t2);
---error 1168
+--error ER_WRONG_MRG_TABLE
 select * from t4;
---error 1168
+--error ER_WRONG_MRG_TABLE
 alter table t4 add column c int;
 flush tables;
---error 1168
+--error ER_WRONG_MRG_TABLE
 select * from t4;
 
 #
@@ -126,7 +126,7 @@ drop table t3,t2,t1;
 # Test table without unions
 #
 create table t1 (a int not null, key(a)) engine=merge;
---error 1030
+--error ER_GET_ERRNO
 select * from t1;
 drop table t1;
 
@@ -444,7 +444,7 @@ drop table t1, t2, t3;
 CREATE TABLE t1(a INT);
 INSERT INTO t1 VALUES(2),(1);
 CREATE TABLE t2(a INT, KEY(a)) ENGINE=MERGE UNION=(t1);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM t2 WHERE a=2;
 DROP TABLE t1, t2;
 
@@ -454,11 +454,11 @@ DROP TABLE t1, t2;
 #
 CREATE TABLE t1(a INT) ENGINE=MEMORY;
 CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM t2;
 DROP TABLE t1, t2;
 CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM t2;
 DROP TABLE t2;
 
@@ -467,25 +467,25 @@ DROP TABLE t2;
 #
 CREATE TABLE t1(a INT, b TEXT);
 CREATE TABLE tm1(a TEXT, b INT) ENGINE=MERGE UNION=(t1);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM tm1;
 DROP TABLE t1, tm1;
 
 CREATE TABLE t1(a SMALLINT, b SMALLINT);
 CREATE TABLE tm1(a INT) ENGINE=MERGE UNION=(t1);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM tm1;
 DROP TABLE t1, tm1;
 
 CREATE TABLE t1(a SMALLINT, b SMALLINT, KEY(a, b));
 CREATE TABLE tm1(a SMALLINT, b SMALLINT, KEY(a)) ENGINE=MERGE UNION=(t1);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM tm1;
 DROP TABLE t1, tm1;
 
 CREATE TABLE t1(a SMALLINT, b SMALLINT, KEY(b));
 CREATE TABLE tm1(a SMALLINT, b SMALLINT, KEY(a)) ENGINE=MERGE UNION=(t1);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM tm1;
 DROP TABLE t1, tm1;
 
@@ -550,15 +550,15 @@ drop table t1;
 #             CREATE TABLE fails
 #
 CREATE TABLE tm1(a INT) ENGINE=MERGE UNION=(t1, t2);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM tm1;
 CHECK TABLE tm1;
 CREATE TABLE t1(a INT);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM tm1;
 CHECK TABLE tm1;
 CREATE TABLE t2(a BLOB);
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM tm1;
 CHECK TABLE tm1;
 ALTER TABLE t2 MODIFY a INT;
@@ -775,7 +775,21 @@ LOCK TABLE t1 WRITE;
     connection con1;
     send INSERT INTO t2 VALUES (1);
 connection default;
-sleep 1; # Let INSERT go into thr_multi_lock().
+# Let INSERT go into thr_multi_lock().
+let $run= `select version() like '%embedded%'`;
+if (!$run)
+{
+   let $wait_condition=
+      SELECT COUNT(*) = 1 FROM information_schema.processlist
+      WHERE state = 'Locked' AND info = 'INSERT INTO t2 VALUES (1)';
+   --source include/wait_condition.inc
+}
+if ($run)
+{
+   # information_schema.processlist based wait routines do not
+   # work for the embedded server
+   sleep 1;
+}
 REPAIR TABLE t1;
 sleep 2; # con1 performs busy waiting during this sleep.
 UNLOCK TABLES;
@@ -809,7 +823,21 @@ LOCK TABLE t1 WRITE;
     connection con1;
     send INSERT INTO t1 VALUES (1);
 connection default;
-sleep 1; # Let INSERT go into thr_multi_lock().
+# Let INSERT go into thr_multi_lock().
+let $run= `select version() like '%embedded%'`;
+if (!$run)
+{
+   let $wait_condition=
+      SELECT COUNT(*) = 1 FROM information_schema.processlist
+      WHERE state = 'Locked' AND info = 'INSERT INTO t1 VALUES (1)';
+   --source include/wait_condition.inc
+}
+if ($run)
+{
+   # information_schema.processlist based wait routines do not
+   # work for the embedded server
+   sleep 1;
+}
 FLUSH TABLES;
 sleep 1; # Let INSERT go through wait_for_tables() where it sleeps.
 FLUSH TABLES;
@@ -893,7 +921,7 @@ DROP TABLE t4;
 --echo # 2. Normal rename.
 SELECT * FROM t3 ORDER BY c1;
 RENAME TABLE t2 TO t5;
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM t3 ORDER BY c1;
 RENAME TABLE t5 TO t2;
 SELECT * FROM t3 ORDER BY c1;
@@ -911,7 +939,7 @@ UNLOCK TABLES;
 --echo #
 --echo # 4. Alter table rename.
 ALTER TABLE t2 RENAME TO t5;
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM t3 ORDER BY c1;
 ALTER TABLE t5 RENAME TO t2;
 SELECT * FROM t3 ORDER BY c1;
@@ -971,7 +999,7 @@ CREATE TABLE t2 (c1 INT, INDEX(c1)) ENGI
 LOCK TABLES t1 WRITE, t2 WRITE;
 INSERT INTO t1 VALUES (1);
 DROP TABLE t1;
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM t2;
 --error ER_NO_SUCH_TABLE
 SELECT * FROM t1;
@@ -1369,7 +1397,7 @@ SELECT * FROM t3;
 ALTER TABLE t1 ENGINE= MEMORY;
 INSERT INTO t1 VALUES (0, 0);
 # Before fixing, this succeeded, but (0, 0) was missing.
---error 1168
+--error ER_WRONG_MRG_TABLE
 SELECT * FROM t3;
 DROP TABLE t1, t2, t3;
 

=== modified file 'mysql-test/t/mysqltest.test'
--- a/mysql-test/t/mysqltest.test	2010-02-09 17:13:57 +0000
+++ b/mysql-test/t/mysqltest.test	2010-05-11 10:48:05 +0000
@@ -486,9 +486,11 @@ remove_file $MYSQLTEST_VARDIR/tmp/mysqlt
 --exec echo "--disable_query_log;" | $MYSQL_TEST 2>&1
 
 
-# Allow trailing # comment
---sleep 1 # Wait for insert delayed to be executed.
---sleep 1        # Wait for insert delayed to be executed.
+# Allow trailing comment after SQL and mysqltest builtin commands
+--sleep 0.01 # Trailing comment 1
+--sleep 0.01 # Trailing comment 2
+SET @aux = 1 ; # Trailing comment 3
+SET @aux = 1 ; # Trailing comment 4
 
 # ----------------------------------------------------------------------------
 # Test error
@@ -916,14 +918,14 @@ source $x/tmp/sourced.inc;
 # Test sleep command
 # ----------------------------------------------------------------------------
 
-sleep 0.5;
+sleep 0.1;
 sleep 1;
+real_sleep 0.1;
 real_sleep 1;
 
 # Parameter from variable, legal and illegal
 let $sleep_var= 0.1;
 sleep $sleep_var;
-let $sleep_var= 1;
 --real_sleep $sleep_var
 
 --write_file $MYSQL_TMP_DIR/sleep.inc
@@ -1705,7 +1707,7 @@ select * from t1;
 # 4. Non-query stmt betwen send and reap allowed
 
 --send select * from t1;
---sleep 0.05
+--sleep 0.01
 --echo Result coming up
 --reap
 

=== modified file 'mysql-test/t/partition_innodb_semi_consistent-master.opt'
--- a/mysql-test/t/partition_innodb_semi_consistent-master.opt	2008-12-16 11:44:18 +0000
+++ b/mysql-test/t/partition_innodb_semi_consistent-master.opt	2010-05-11 10:48:05 +0000
@@ -1 +1 @@
---innodb_lock_wait_timeout=2
+--innodb_lock_wait_timeout=1

=== modified file 'mysql-test/t/sp.test'
--- a/mysql-test/t/sp.test	2009-12-23 13:44:03 +0000
+++ b/mysql-test/t/sp.test	2010-05-11 10:48:05 +0000
@@ -2924,7 +2924,7 @@ begin
   create table t2 as select * from t3;
 end|
 
--- error 1146
+-- error ER_NO_SUCH_TABLE
 call bug4904()|
 
 drop procedure bug4904|
@@ -3000,7 +3000,7 @@ end|
 
 select created into @c1 from mysql.proc
   where db='test' and name='bug5251'|
---sleep 2
+--real_sleep 1.01
 alter procedure bug5251 comment 'foobar'|
 select count(*) from mysql.proc
   where  db='test' and name='bug5251' and created = @c1|

=== modified file 'mysql-test/t/subselect.test'
--- a/mysql-test/t/subselect.test	2010-04-12 10:12:20 +0000
+++ b/mysql-test/t/subselect.test	2010-05-11 10:48:05 +0000
@@ -813,10 +813,14 @@ create table t3 (a int, b int, index a (
 insert into t1 values (1,10), (2,20), (3,30), (4,40);
 disable_query_log;
 # making table large enough
-let $1 = 10000;
+let $1 = 1000;
 while ($1)
  {
-  eval insert into t1 values (rand()*100000+200,rand()*100000);
+  eval insert into t1 values (rand()*100000+200,rand()*100000),(rand()*100000+200,rand()*100000),
+                             (rand()*100000+200,rand()*100000),(rand()*100000+200,rand()*100000),
+                             (rand()*100000+200,rand()*100000),(rand()*100000+200,rand()*100000),
+                             (rand()*100000+200,rand()*100000),(rand()*100000+200,rand()*100000),
+                             (rand()*100000+200,rand()*100000),(rand()*100000+200,rand()*100000);
   dec $1;
  }
 enable_query_log;
@@ -2613,12 +2617,11 @@ while ($1)
 {
   eval INSERT INTO t1(a) VALUES(RAND()*1000);
   eval SELECT MAX(b) FROM t1 INTO @id;
-  let $2=10;
-  while ($2)
-  {
-    eval INSERT INTO t2(y,z) VALUES(@id,RAND()*1000);
-    dec $2;
-  }
+  eval INSERT INTO t2(y,z) VALUES(@id,RAND()*1000),(@id,RAND()*1000),
+                                 (@id,RAND()*1000),(@id,RAND()*1000),
+                                 (@id,RAND()*1000),(@id,RAND()*1000),
+                                 (@id,RAND()*1000),(@id,RAND()*1000),
+                                 (@id,RAND()*1000),(@id,RAND()*1000);
   dec $1;
 }
 enable_query_log;
@@ -3219,12 +3222,21 @@ DROP TABLE t1,t2;
 create table t1(f11 int, f12 int);
 create table t2(f21 int unsigned not null, f22 int, f23 varchar(10));
 insert into t1 values(1,1),(2,2), (3, 3);
-let $i=10000;
+let $i=1000;
 --disable_query_log
 --disable_warnings
 while ($i)
 {
-  eval insert into t2 values (-1 , $i/5000 + 1, '$i');
+   eval insert into t2 values (-1 , ($i * 10 - 0)/5000 + 1, '$i 9'),
+                              (-1 , ($i * 10 - 1)/5000 + 1, '$i 8'),
+                              (-1 , ($i * 10 - 2)/5000 + 1, '$i 7'),
+                              (-1 , ($i * 10 - 3)/5000 + 1, '$i 6'),
+                              (-1 , ($i * 10 - 4)/5000 + 1, '$i 5'),
+                              (-1 , ($i * 10 - 5)/5000 + 1, '$i 4'),
+                              (-1 , ($i * 10 - 6)/5000 + 1, '$i 3'),
+                              (-1 , ($i * 10 - 7)/5000 + 1, '$i 2'),
+                              (-1 , ($i * 10 - 8)/5000 + 1, '$i 1'),
+                              (-1 , ($i * 10 - 9)/5000 + 1, '$i 0');
   dec $i;
 }
 --enable_warnings


Attachment: [text/bzr-bundle] bzr/matthias.leich@sun.com-20100511104805-jq85spulj1a5j7os.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (matthias.leich:3378) WL#5356Matthias Leich11 May