summaryrefslogtreecommitdiff
path: root/innobase/mtr
diff options
context:
space:
mode:
authormonty@mishka.local <>2004-04-26 15:53:31 +0300
committermonty@mishka.local <>2004-04-26 15:53:31 +0300
commit21fd1d270eb58fa95551bb6e37ecef5a30785929 (patch)
tree25e3315af05fa92d20d2ad1d812882957c400337 /innobase/mtr
parent7d9a9fd93ac4622d596920169a6d6afbd787c377 (diff)
parent7d3e633edc5db31c0698660ed644d7a18faea41c (diff)
downloadmariadb-git-21fd1d270eb58fa95551bb6e37ecef5a30785929.tar.gz
Merge with 4.0
Diffstat (limited to 'innobase/mtr')
-rw-r--r--innobase/mtr/mtr0log.c20
-rw-r--r--innobase/mtr/mtr0mtr.c7
2 files changed, 14 insertions, 13 deletions
diff --git a/innobase/mtr/mtr0log.c b/innobase/mtr/mtr0log.c
index 5a4aaa2377d..82baa8905ba 100644
--- a/innobase/mtr/mtr0log.c
+++ b/innobase/mtr/mtr0log.c
@@ -54,15 +54,15 @@ mlog_write_initial_log_record(
byte* log_ptr;
ut_ad(type <= MLOG_BIGGEST_TYPE);
+ ut_ad(type > MLOG_8BYTES);
if (ptr < buf_pool->frame_zero || ptr >= buf_pool->high_end) {
fprintf(stderr,
- "InnoDB: Error: trying to write to a stray memory location %lx\n",
- (ulong) ptr);
+ "InnoDB: Error: trying to write to a stray memory location %p\n", ptr);
ut_error;
}
- log_ptr = mlog_open(mtr, 20);
+ log_ptr = mlog_open(mtr, 11);
/* If no logging is requested, we may return now */
if (log_ptr == NULL) {
@@ -95,6 +95,7 @@ mlog_parse_initial_log_record(
}
*type = (byte)((ulint)*ptr & ~MLOG_SINGLE_REC_FLAG);
+ ut_ad(*type <= MLOG_BIGGEST_TYPE);
ptr++;
@@ -220,8 +221,7 @@ mlog_write_ulint(
if (ptr < buf_pool->frame_zero || ptr >= buf_pool->high_end) {
fprintf(stderr,
- "InnoDB: Error: trying to write to a stray memory location %lx\n",
- (ulong) ptr);
+ "InnoDB: Error: trying to write to a stray memory location %p\n", ptr);
ut_error;
}
@@ -234,7 +234,7 @@ mlog_write_ulint(
mach_write_to_4(ptr, val);
}
- log_ptr = mlog_open(mtr, 30);
+ log_ptr = mlog_open(mtr, 11 + 2 + 5);
/* If no logging is requested, we may return now */
if (log_ptr == NULL) {
@@ -267,8 +267,7 @@ mlog_write_dulint(
if (ptr < buf_pool->frame_zero || ptr >= buf_pool->high_end) {
fprintf(stderr,
- "InnoDB: Error: trying to write to a stray memory location %lx\n",
- (ulong) ptr);
+ "InnoDB: Error: trying to write to a stray memory location %p\n", ptr);
ut_error;
}
@@ -276,7 +275,7 @@ mlog_write_dulint(
mach_write_to_8(ptr, val);
- log_ptr = mlog_open(mtr, 30);
+ log_ptr = mlog_open(mtr, 11 + 2 + 9);
/* If no logging is requested, we may return now */
if (log_ptr == NULL) {
@@ -311,8 +310,7 @@ mlog_write_string(
if (ptr < buf_pool->frame_zero || ptr >= buf_pool->high_end) {
fprintf(stderr,
- "InnoDB: Error: trying to write to a stray memory location %lx\n",
- (ulong) ptr);
+ "InnoDB: Error: trying to write to a stray memory location %p\n", ptr);
ut_error;
}
ut_ad(ptr && mtr);
diff --git a/innobase/mtr/mtr0mtr.c b/innobase/mtr/mtr0mtr.c
index ac1a638063d..fa1481dcb5f 100644
--- a/innobase/mtr/mtr0mtr.c
+++ b/innobase/mtr/mtr0mtr.c
@@ -262,7 +262,8 @@ mtr_first_to_modify_page_after_backup(
block->frame),
backup_lsn) <= 0) {
- printf("Page %lu newest %lu backup %lu\n",
+ fprintf(stderr,
+ "Page %lu newest %lu backup %lu\n",
(ulong) block->offset,
(ulong) ut_dulint_get_low(
buf_frame_get_newest_modification(
@@ -507,6 +508,7 @@ mtr_read_dulint(
return(mach_read_from_8(ptr));
}
+#ifdef UNIV_DEBUG
/*************************************************************
Prints info of an mtr handle. */
@@ -515,8 +517,9 @@ mtr_print(
/*======*/
mtr_t* mtr) /* in: mtr */
{
- printf(
+ fprintf(stderr,
"Mini-transaction handle: memo size %lu bytes log size %lu bytes\n",
(ulong) dyn_array_get_data_size(&(mtr->memo)),
(ulong) dyn_array_get_data_size(&(mtr->log)));
}
+#endif /* UNIV_DEBUG */