summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorunknown <tnurnberg@sin.intern.azundris.com>2007-07-10 18:33:20 +0200
committerunknown <tnurnberg@sin.intern.azundris.com>2007-07-10 18:33:20 +0200
commit3d9841622e57c9267ad32bf2c0ab37c9353b2ba3 (patch)
tree0a25bc29959e7ea790ca1335d1eb7986eed92c7d /sql/log.cc
parent9016198aa2e7f9d58408a08c13861450764bcaaa (diff)
parent82ac789172d627739541284cd1f314d4fa514a3e (diff)
downloadmariadb-git-3d9841622e57c9267ad32bf2c0ab37c9353b2ba3.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/log.cc')
-rw-r--r--sql/log.cc16
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