List:Internals« Previous MessageNext Message »
From:Heikki Tuuri Date:March 21 2005 9:10pm
Subject:bk commit into 4.0 tree (heikki:1.2089) BUG#9277
View as plain text  
Below is the list of changes that have just been committed into a local
4.0 repository of heikki. When heikki 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
  1.2089 05/03/21 22:10:42 heikki@stripped +2 -0
  trx0trx.c, trx0trx.h:
    If MySQL wrote to its binlog, but for some reason trx->update_undo and
trx->insert_undo were NULL in InnoDB, then trx->commit_lsn was garbage, and InnoDB
could assert in the log flush of trx_commit_complete_for_mysql() (Bug #9277)

  innobase/trx/trx0trx.c
    1.42 05/03/21 22:07:48 heikki@stripped +9 -1
    If MySQL wrote to its binlog, but for some reason trx->update_undo and
trx->insert_undo were NULL in InnoDB, then trx->commit_lsn was garbage, and InnoDB
could assert in the log flush of trx_commit_complete_for_mysql() (Bug #9277)

  innobase/include/trx0trx.h
    1.34 05/03/21 22:07:41 heikki@stripped +6 -0
    If MySQL wrote to its binlog, but for some reason trx->update_undo and
trx->insert_undo were NULL in InnoDB, then trx->commit_lsn was garbage, and InnoDB
could assert in the log flush of trx_commit_complete_for_mysql() (Bug #9277)

# 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:	heikki
# Host:	hundin.mysql.fi
# Root:	/home/heikki/mysql-4.0

--- 1.33/innobase/include/trx0trx.h	Mon Jul 12 16:47:19 2004
+++ 1.34/innobase/include/trx0trx.h	Mon Mar 21 22:07:41 2005
@@ -346,6 +346,12 @@
 					in MySQL's binlog write, we will
 					flush the log to disk later in
 					a separate call */
+	ibool		must_flush_log_later;/* this flag is set to TRUE in
+					trx_commit_off_kernel() if
+					flush_log_later was TRUE, and there
+					were modifications by the transaction;
+					in that case we must flush the log
+					in trx_commit_complete_for_mysql() */
 	dulint		commit_lsn;	/* lsn at the time of the commit */
 	ibool		dict_operation;	/* TRUE if the trx is used to create
 					a table, create an index, or drop a

--- 1.41/innobase/trx/trx0trx.c	Mon Jul 12 16:47:19 2004
+++ 1.42/innobase/trx/trx0trx.c	Mon Mar 21 22:07:48 2005
@@ -96,6 +96,7 @@
 	trx->check_unique_secondary = TRUE;
 
 	trx->flush_log_later = FALSE;
+	trx->must_flush_log_later = FALSE;
 
 	trx->dict_operation = FALSE;
 
@@ -634,6 +635,8 @@
 #endif /* UNIV_SYNC_DEBUG */
 
 	rseg = trx->rseg;
+
+	trx->must_flush_log_later = FALSE;
 	
 	if (trx->insert_undo != NULL || trx->update_undo != NULL) {
 
@@ -798,6 +801,7 @@
 
                 if (trx->flush_log_later) {
                         /* Do nothing yet */
+			trx->must_flush_log_later = TRUE;
                 } else if (srv_flush_log_at_trx_commit == 0) {
                         /* Do nothing */
                 } else if (srv_flush_log_at_trx_commit == 1) {
@@ -1516,7 +1520,9 @@
 	
 	trx->op_info = (char*)"flushing log";
 
-        if (srv_flush_log_at_trx_commit == 0) {
+	if (!trx->must_flush_log_later) {
+		/* Do nothing */
+	} if (srv_flush_log_at_trx_commit == 0) {
                 /* Do nothing */
         } else if (srv_flush_log_at_trx_commit == 1) {
                 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {
@@ -1537,6 +1543,8 @@
         } else {
                 ut_error;
         }
+
+	trx->must_flush_log_later = FALSE;
 
 	trx->op_info = (char*)"";
 
Thread
bk commit into 4.0 tree (heikki:1.2089) BUG#9277Heikki Tuuri21 Mar