diff options
author | unknown <tnurnberg@sin.intern.azundris.com> | 2007-07-10 18:33:20 +0200 |
---|---|---|
committer | unknown <tnurnberg@sin.intern.azundris.com> | 2007-07-10 18:33:20 +0200 |
commit | 7326e9be832eb717451fc39e5a507057802407a9 (patch) | |
tree | 0a25bc29959e7ea790ca1335d1eb7986eed92c7d /sql | |
parent | adc3d3cb8247a6362e5f9e347d7e67a668334b7d (diff) | |
parent | b69b9f83bc832d7e45a0d7715b15cdfdcdebb306 (diff) | |
download | mariadb-git-7326e9be832eb717451fc39e5a507057802407a9.tar.gz |
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/home/tnurnberg/22540/50-22540
sql/log.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/log.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/log.cc b/sql/log.cc index 86947d295d8..744d2a3ca65 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1965,14 +1965,14 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event) } /* - Adjust hdr_offs. Note that this doesn't mean it will necessarily - be valid in the next iteration; if the current event is very long, - it may take a couple of read-iterations (and subsequent fixings - of hdr_offs) for it to become valid again. - if we had a split header, hdr_offs was already fixed above. + Adjust hdr_offs. Note that it may still point beyond the segment + read in the next iteration; if the current event is very long, + it may take a couple of read-iterations (and subsequent adjustments + of hdr_offs) for it to point into the then-current segment. + If we have a split header (!carry), hdr_offs will be set at the + beginning of the next iteration, overwriting the value we set here: */ - if (carry == 0) - hdr_offs -= length; + hdr_offs -= length; } /* Write data to the binary log file */ @@ -1982,6 +1982,8 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event) DBUG_EXECUTE_IF("half_binlogged_transaction", goto DBUG_skip_commit;); } while ((length=my_b_fill(cache))); + DBUG_ASSERT(carry == 0); + if (commit_event->write(&log_file)) goto err; #ifndef DBUG_OFF |