diff options
author | unknown <serg@serg.mylan> | 2005-03-22 16:11:43 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-03-22 16:11:43 +0100 |
commit | e31642727b405e83ed0512a6c3318869f2a31e0c (patch) | |
tree | cb3fd62572918eb80e7c2add26636565c33ecace /innobase | |
parent | 82182de38722242c3ec5c6b7d77bdbfe271b4bc5 (diff) | |
parent | 6ed02debff53e895e6c526fbbeac7c791e1f269f (diff) | |
download | mariadb-git-e31642727b405e83ed0512a6c3318869f2a31e0c.tar.gz |
Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
innobase/include/trx0trx.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/include/trx0trx.h | 6 | ||||
-rw-r--r-- | innobase/trx/trx0trx.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h index 64e9c87fbbd..d46613c3a68 100644 --- a/innobase/include/trx0trx.h +++ b/innobase/include/trx0trx.h @@ -381,6 +381,12 @@ struct trx_struct{ 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 diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c index 643f7e164e5..cdda1dd4dee 100644 --- a/innobase/trx/trx0trx.c +++ b/innobase/trx/trx0trx.c @@ -99,6 +99,7 @@ trx_create( trx->check_unique_secondary = TRUE; trx->flush_log_later = FALSE; + trx->must_flush_log_later = FALSE; trx->dict_operation = FALSE; @@ -710,6 +711,8 @@ trx_commit_off_kernel( ut_ad(mutex_own(&kernel_mutex)); #endif /* UNIV_SYNC_DEBUG */ + trx->must_flush_log_later = FALSE; + rseg = trx->rseg; if (trx->insert_undo != NULL || trx->update_undo != NULL) { @@ -875,6 +878,7 @@ trx_commit_off_kernel( 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) { @@ -1594,7 +1598,9 @@ trx_commit_complete_for_mysql( trx->op_info = "flushing log"; - if (srv_flush_log_at_trx_commit == 0) { + if (!trx->must_flush_log_later) { + /* Do nothing */ + } else 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) { @@ -1615,6 +1621,8 @@ trx_commit_complete_for_mysql( } else { ut_error; } + + trx->must_flush_log_later = FALSE; trx->op_info = ""; |