List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:September 22 2006 7:16pm
Subject:bk commit into 5.1 tree (aelkin:1.2347)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of elkin. When elkin does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-09-22 22:16:02+03:00, aelkin@stripped +3 -0
  binlog_row_binlog test gained some indeterministic checks with changes due to
  ChangeSet@stripped, 2006-09-12 15:42:13+02:00, guilhem@stripped +14 -0
    Fixing problems I identified in my auto_increment work pushed in July
    (as part of the auto_increment cleanup of WL #3146; ...
  The problem is in that show binlog events in indeterministic, row events can be compressed,
  so that 2 seconds original delay does not guard from inconsistency.
  
  From another side there is no requirement for binlog to be event per row and then 
  to verify if binlog has recorded what was recently inserted is posssible reliably
  only through reading from it.  

  mysql-test/extra/binlog_tests/binlog_insert_delayed.test@stripped, 2006-09-22 22:15:58+03:00, aelkin@stripped +4 -5
    removing sleeps.

  mysql-test/include/wait_until_rows_count.inc@stripped, 2006-09-22 22:15:58+03:00, aelkin@stripped +52 -0
    macro implements waiting until a targeted table has a prescribed rows number.
    

  mysql-test/include/wait_until_rows_count.inc@stripped, 2006-09-22 22:15:58+03:00, aelkin@stripped +0 -0

  mysql-test/r/binlog_row_binlog.result@stripped, 2006-09-22 22:15:58+03:00, aelkin@stripped +0 -2
    new result

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	aelkin
# Host:	dsl-hkigw8-feb9fb00-191.dhcp.inet.fi
# Root:	/home/elkin/MySQL/TEAM/FIXES/5.1/binlog_insert_delayed_WL3146

--- 1.2/mysql-test/extra/binlog_tests/binlog_insert_delayed.test	2006-09-22 22:16:11 +03:00
+++ 1.3/mysql-test/extra/binlog_tests/binlog_insert_delayed.test	2006-09-22 22:16:11 +03:00
@@ -12,15 +12,14 @@ insert delayed into t1 values (207);
 # sometimes group together and sometimes not, so the table may be
 # unlocked/relocked causing a different number of table map log
 # events.
-sleep 2;
 insert delayed into t1 values (null);
-sleep 2;
 insert delayed into t1 values (300);
-sleep 2; # time for the delayed queries to reach disk
 insert delayed into t1 values (null),(null),(null),(null);
-sleep 2;
 insert delayed into t1 values (null),(null),(400),(null);
-sleep 2;
+
+let $count=11;
+let $table=t1;
+--source include/wait_until_rows_count.inc
 select * from t1;
 --replace_column 2 # 5 #
 --replace_regex /table_id: [0-9]+/table_id: #/
--- New file ---
+++ mysql-test/include/wait_until_rows_count.inc	06/09/22 22:15:58
# include/wait_until_rows_count.inc
# inspired by wait_for_slave_status by Matthias Leich
#
# SUMMARY
#
#    Waits until SELECT count(*)-$count from $table returns zero
#
# USAGE
#
#    Set vars like
#      let $count=11;
#      let $table=t1;
#      # invoke the macro
#      --include wait_until_rows_count.inc
#
# EXAMPLE
# extra/binlog/binlog_insert_delayed.test
#
#
# TODO: generalize up to wait_[until|while] with arbitrary select or even query and
#       a condition to wait or get awakened
#       It's impossible to implement such a "most" general macro without
#       extending mysqltest. Just no way to pass a query as an argument and
#       evaluate it here, like eval "$quuery". One is bound
#       to specify it inside of the macro

--disable_query_log

let $wait_counter= 300;     # max wait in 0.1 seconds
while ($wait_counter)
{
    eval select count(*)-$count from $table into @rez;
    let $rez=`select @rez`;
    let $success=`SELECT @rez = 0`;
    let $no_success=1;
    if ($success)
    {
        let $wait_counter= 1; # droppping counter to leave loop
        let $no_success=0;
    }
    if ($no_success)
    {
       --sleep 0.1
    }
    dec $wait_counter;
}

--enable_query_log
if ($no_success)
{
	--die Timeout in wait_until_rows_count.inc, required table never had a prescribed number of rows.
}


--- 1.6/mysql-test/r/binlog_row_binlog.result	2006-09-22 22:16:11 +03:00
+++ 1.7/mysql-test/r/binlog_row_binlog.result	2006-09-22 22:16:11 +03:00
@@ -284,6 +284,4 @@ master-bin.000001	#	Table_map	1	#	table_
 master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
 master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
 master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
-master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
-master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
 drop table t1;
Thread
bk commit into 5.1 tree (aelkin:1.2347)Andrei Elkin22 Sep