Commit 4a447cde authored by marko's avatar marko

branches/zip: lock_print_info_all_transactions(), buf_read_recv_pages():

Tolerate missing tablespaces (zip_size==ULINT_UNDEFINED).
buf_page_get_gen(): Add ut_ad(ut_is_2pow(zip_size)).

Issue #289, rb://136 approved by Sunny Bains
parent 17105a0a
2009-06-29 The InnoDB Team
* buf/buf0buf.c, buf/buf0rea.c, lock/lock0lock.c:
Tolerate missing tablespaces during crash recovery and when
printing information on locks.
2009-06-29 The InnoDB Team
* buf/buf0buf.c:
......
......@@ -2012,6 +2012,7 @@ buf_page_get_gen(
ut_ad((mode == BUF_GET) || (mode == BUF_GET_IF_IN_POOL)
|| (mode == BUF_GET_NO_LATCH));
ut_ad(zip_size == fil_space_get_zip_size(space));
ut_ad(ut_is_2pow(zip_size));
#ifndef UNIV_LOG_DEBUG
ut_ad(!ibuf_inside() || ibuf_page(space, zip_size, offset, NULL));
#endif
......
......@@ -751,6 +751,14 @@ buf_read_recv_pages(
ulint i;
zip_size = fil_space_get_zip_size(space);
if (UNIV_UNLIKELY(zip_size == ULINT_UNDEFINED)) {
/* It is a single table tablespace and the .ibd file is
missing: do nothing */
return;
}
tablespace_version = fil_space_get_version(space);
for (i = 0; i < n_stored; i++) {
......
......@@ -4499,6 +4499,20 @@ lock_print_info_all_transactions(
ulint zip_size= fil_space_get_zip_size(space);
ulint page_no = lock->un_member.rec_lock.page_no;
if (UNIV_UNLIKELY(zip_size == ULINT_UNDEFINED)) {
/* It is a single table tablespace and
the .ibd file is missing (TRUNCATE
TABLE probably stole the locks): just
print the lock without attempting to
load the page in the buffer pool. */
fprintf(file, "RECORD LOCKS on"
" non-existing space %lu\n",
(ulong) space);
goto print_rec;
}
lock_mutex_exit_kernel();
innobase_mysql_end_print_arbitrary_thd();
......@@ -4517,6 +4531,7 @@ lock_print_info_all_transactions(
goto loop;
}
print_rec:
lock_rec_print(file, lock);
} else {
ut_ad(lock_get_type_low(lock) & LOCK_TABLE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment