Commit 74a398c9 authored by marko's avatar marko

branches/innodb+: ibuf_get_volume_buffered():

Invoke ibuf_get_volume_buffered_count() as many times as
ibuf_rec_get_volume(rec), so that *n_recs will be updated as appropriate.
This fixes Issue #82: some deletes will be buffered in purge.
parent d0bef3b8
......@@ -528,6 +528,14 @@ btr_cur_search_to_nth_level(
buf_mode = BUF_GET_IF_IN_POOL_OR_WATCH;
}
if (height == 0
&& buf_mode != BUF_GET_IF_IN_POOL
&& buf_mode != BUF_GET_IF_IN_POOL_OR_WATCH
&& !dict_index_is_clust(index)) {
fprintf(stderr, "fetching %lu:%lu of %s\n",
(ulong) space, (ulong) page_no, index->name);
}
block = buf_page_get_gen(
space, zip_size, page_no, rw_latch, guess, buf_mode,
__FILE__, __LINE__, mtr);
......
......@@ -177,6 +177,9 @@ buf_read_ahead_random(
ulint offset) /* in: page number of a page which the current thread
wants to access */
{
#if 1
return(0);
#else
ib_int64_t tablespace_version;
ulint recent_blocks = 0;
ulint count;
......@@ -309,6 +312,7 @@ buf_read_ahead_random(
++srv_read_ahead_rnd;
return(count);
#endif
}
/************************************************************************
......@@ -395,6 +399,9 @@ buf_read_ahead_linear(
ulint offset) /* in: page number of a page; NOTE: the current thread
must want access to this page (see NOTE 3 above) */
{
#if 1
return(0);
#else
ib_int64_t tablespace_version;
buf_page_t* bpage;
buf_frame_t* frame;
......@@ -627,6 +634,7 @@ buf_read_ahead_linear(
++srv_read_ahead_seq;
return(count);
#endif
}
/************************************************************************
......
......@@ -5894,6 +5894,7 @@ ha_innobase::create(
| DICT_TF_FORMAT_ZIP
<< DICT_TF_FORMAT_SHIFT;
break;
#if 0
case 8:
flags = 4 << DICT_TF_ZSSIZE_SHIFT
| DICT_TF_COMPACT
......@@ -5906,8 +5907,9 @@ ha_innobase::create(
| DICT_TF_FORMAT_ZIP
<< DICT_TF_FORMAT_SHIFT;
break;
#if DICT_TF_ZSSIZE_MAX != 5
# error "DICT_TF_ZSSIZE_MAX != 5"
#endif
#if DICT_TF_ZSSIZE_MAX != 3
# error "DICT_TF_ZSSIZE_MAX != 3"
#endif
}
......
......@@ -2676,6 +2676,7 @@ ibuf_get_volume_buffered(
volume = 0;
*n_recs = 0;
memset(hash_bitmap, 0, sizeof hash_bitmap);
rec = btr_pcur_get_rec(pcur);
page = page_align(rec);
......@@ -2698,6 +2699,9 @@ ibuf_get_volume_buffered(
volume += ibuf_rec_get_volume(rec);
ibuf_get_volume_buffered_count(
rec, hash_bitmap, sizeof hash_bitmap, n_recs);
rec = page_rec_get_prev(rec);
}
......@@ -2748,6 +2752,9 @@ ibuf_get_volume_buffered(
volume += ibuf_rec_get_volume(rec);
ibuf_get_volume_buffered_count(
rec, hash_bitmap, sizeof hash_bitmap, n_recs);
rec = page_rec_get_prev(rec);
}
......
......@@ -235,7 +235,7 @@ management to ensure correct alignment for doubles etc. */
*/
/* The 2-logarithm of UNIV_PAGE_SIZE: */
#define UNIV_PAGE_SIZE_SHIFT 14
#define UNIV_PAGE_SIZE_SHIFT 12
/* The universal page size of the database */
#define UNIV_PAGE_SIZE (1 << UNIV_PAGE_SIZE_SHIFT)
......
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