diff options
author | unknown <tulin@dl145b.mysql.com> | 2005-06-21 08:49:21 +0200 |
---|---|---|
committer | unknown <tulin@dl145b.mysql.com> | 2005-06-21 08:49:21 +0200 |
commit | cee82bca2970bfe36e17a84cad27a238900f7f81 (patch) | |
tree | 021f00d0d8d4e312b7cc20166e879b5052187631 /storage/innobase/mtr | |
parent | ca2e8ed7f372351fbf290445b2f5afd4840d7b45 (diff) | |
parent | bf6a86afcafc559aed642d10da692c94584d258b (diff) | |
download | mariadb-git-cee82bca2970bfe36e17a84cad27a238900f7f81.tar.gz |
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/mysqld.cc:
Auto merged
storage/innobase/btr/btr0btr.c:
Auto merged
storage/innobase/btr/btr0cur.c:
Auto merged
storage/innobase/btr/btr0pcur.c:
Auto merged
storage/innobase/btr/btr0sea.c:
Auto merged
storage/innobase/buf/buf0buf.c:
Auto merged
storage/innobase/buf/buf0flu.c:
Auto merged
storage/innobase/buf/buf0lru.c:
Auto merged
storage/innobase/buf/buf0rea.c:
Auto merged
storage/innobase/data/data0data.c:
Auto merged
storage/innobase/data/data0type.c:
Auto merged
storage/innobase/dict/dict0boot.c:
Auto merged
storage/innobase/dict/dict0crea.c:
Auto merged
storage/innobase/dict/dict0dict.c:
Auto merged
storage/innobase/dict/dict0mem.c:
Auto merged
storage/innobase/fil/fil0fil.c:
Auto merged
storage/innobase/fsp/fsp0fsp.c:
Auto merged
storage/innobase/ibuf/ibuf0ibuf.c:
Auto merged
storage/innobase/include/btr0btr.h:
Auto merged
storage/innobase/include/btr0btr.ic:
Auto merged
storage/innobase/include/btr0cur.h:
Auto merged
storage/innobase/include/btr0cur.ic:
Auto merged
storage/innobase/include/buf0buf.h:
Auto merged
storage/innobase/include/buf0buf.ic:
Auto merged
storage/innobase/include/buf0lru.h:
Auto merged
storage/innobase/include/data0type.h:
Auto merged
storage/innobase/include/data0type.ic:
Auto merged
storage/innobase/include/dyn0dyn.h:
Auto merged
storage/innobase/include/dyn0dyn.ic:
Auto merged
storage/innobase/include/lock0lock.h:
Auto merged
storage/innobase/include/log0log.h:
Auto merged
storage/innobase/include/mach0data.h:
Auto merged
storage/innobase/include/mach0data.ic:
Auto merged
storage/innobase/include/mem0mem.ic:
Auto merged
storage/innobase/include/mtr0log.h:
Auto merged
storage/innobase/include/mtr0mtr.h:
Auto merged
storage/innobase/include/os0file.h:
Auto merged
storage/innobase/include/page0cur.h:
Auto merged
storage/innobase/include/page0cur.ic:
Auto merged
storage/innobase/include/page0page.h:
Auto merged
storage/innobase/include/page0page.ic:
Auto merged
storage/innobase/include/read0read.ic:
Auto merged
storage/innobase/include/rem0rec.h:
Auto merged
storage/innobase/include/rem0rec.ic:
Auto merged
storage/innobase/include/row0mysql.h:
Auto merged
storage/innobase/include/row0sel.ic:
Auto merged
storage/innobase/include/row0upd.ic:
Auto merged
storage/innobase/include/sync0rw.ic:
Auto merged
storage/innobase/include/trx0rseg.ic:
Auto merged
storage/innobase/include/trx0trx.h:
Auto merged
storage/innobase/include/univ.i:
Auto merged
storage/innobase/include/ut0dbg.h:
Auto merged
storage/innobase/include/ut0rnd.ic:
Auto merged
storage/innobase/lock/lock0lock.c:
Auto merged
storage/innobase/log/log0log.c:
Auto merged
storage/innobase/log/log0recv.c:
Auto merged
storage/innobase/mtr/mtr0log.c:
Auto merged
storage/innobase/mtr/mtr0mtr.c:
Auto merged
storage/innobase/os/os0file.c:
Auto merged
storage/innobase/page/page0cur.c:
Auto merged
storage/innobase/page/page0page.c:
Auto merged
storage/innobase/rem/rem0cmp.c:
Auto merged
storage/innobase/rem/rem0rec.c:
Auto merged
storage/innobase/row/row0ins.c:
Auto merged
storage/innobase/row/row0mysql.c:
Auto merged
storage/innobase/row/row0purge.c:
Auto merged
storage/innobase/row/row0row.c:
Auto merged
storage/innobase/row/row0sel.c:
Auto merged
storage/innobase/row/row0undo.c:
Auto merged
storage/innobase/row/row0upd.c:
Auto merged
storage/innobase/row/row0vers.c:
Auto merged
storage/innobase/srv/srv0start.c:
Auto merged
storage/innobase/sync/sync0sync.c:
Auto merged
storage/innobase/trx/trx0rec.c:
Auto merged
storage/innobase/trx/trx0roll.c:
Auto merged
storage/innobase/trx/trx0trx.c:
Auto merged
storage/innobase/ut/ut0dbg.c:
Auto merged
Diffstat (limited to 'storage/innobase/mtr')
-rw-r--r-- | storage/innobase/mtr/mtr0log.c | 24 | ||||
-rw-r--r-- | storage/innobase/mtr/mtr0mtr.c | 12 |
2 files changed, 20 insertions, 16 deletions
diff --git a/storage/innobase/mtr/mtr0log.c b/storage/innobase/mtr/mtr0log.c index 4f826f242e8..0308619073a 100644 --- a/storage/innobase/mtr/mtr0log.c +++ b/storage/innobase/mtr/mtr0log.c @@ -15,6 +15,7 @@ Created 12/7/1995 Heikki Tuuri #include "buf0buf.h" #include "dict0boot.h" #include "log0recv.h" +#include "page0page.h" /************************************************************ Catenates n bytes to the mtr log. */ @@ -22,9 +23,9 @@ Catenates n bytes to the mtr log. */ void mlog_catenate_string( /*=================*/ - mtr_t* mtr, /* in: mtr */ - byte* str, /* in: string to write */ - ulint len) /* in: string length */ + mtr_t* mtr, /* in: mtr */ + const byte* str, /* in: string to write */ + ulint len) /* in: string length */ { dyn_array_t* mlog; @@ -301,14 +302,15 @@ corresponding log record to the mini-transaction log. */ void mlog_write_string( /*==============*/ - byte* ptr, /* in: pointer where to write */ - byte* str, /* in: string to write */ - ulint len, /* in: string length */ - mtr_t* mtr) /* in: mini-transaction handle */ + byte* ptr, /* in: pointer where to write */ + const byte* str, /* in: string to write */ + ulint len, /* in: string length */ + mtr_t* mtr) /* in: mini-transaction handle */ { byte* log_ptr; - if (ptr < buf_pool->frame_zero || ptr >= buf_pool->high_end) { + if (UNIV_UNLIKELY(ptr < buf_pool->frame_zero) + || UNIV_UNLIKELY(ptr >= buf_pool->high_end)) { fprintf(stderr, "InnoDB: Error: trying to write to a stray memory location %p\n", ptr); ut_error; @@ -405,7 +407,9 @@ mlog_open_and_write_index( const byte* log_start; const byte* log_end; - if (!index->table->comp) { + ut_ad(!!page_rec_is_comp(rec) == index->table->comp); + + if (!page_rec_is_comp(rec)) { log_start = log_ptr = mlog_open(mtr, 11 + size); if (!log_ptr) { return(NULL); /* logging is disabled */ @@ -498,6 +502,8 @@ mlog_parse_index( dict_table_t* table; dict_index_t* ind; + ut_ad(comp == FALSE || comp == TRUE); + if (comp) { if (end_ptr < ptr + 4) { return(NULL); diff --git a/storage/innobase/mtr/mtr0mtr.c b/storage/innobase/mtr/mtr0mtr.c index 6e918806eb1..da045be1f62 100644 --- a/storage/innobase/mtr/mtr0mtr.c +++ b/storage/innobase/mtr/mtr0mtr.c @@ -48,16 +48,11 @@ mtr_memo_slot_release( object = slot->object; type = slot->type; - if (object != NULL) { + if (UNIV_LIKELY(object != NULL)) { if (type <= MTR_MEMO_BUF_FIX) { buf_page_release((buf_block_t*)object, type, mtr); } else if (type == MTR_MEMO_S_LOCK) { rw_lock_s_unlock((rw_lock_t*)object); -#ifndef UNIV_DEBUG - } else { - rw_lock_x_unlock((rw_lock_t*)object); - } -#endif #ifdef UNIV_DEBUG } else if (type == MTR_MEMO_X_LOCK) { rw_lock_x_unlock((rw_lock_t*)object); @@ -65,8 +60,11 @@ mtr_memo_slot_release( ut_ad(type == MTR_MEMO_MODIFY); ut_ad(mtr_memo_contains(mtr, object, MTR_MEMO_PAGE_X_FIX)); - } +#else + } else { + rw_lock_x_unlock((rw_lock_t*)object); #endif + } } slot->object = NULL; |