Commit graph

108 commits

Author SHA1 Message Date
marko
d90bea085a branches/zip: Remove unneeded definitions and dependencies
from UNIV_HOTBACKUP builds.
2009-03-23 14:21:34 +00:00
vasil
d8aa953d08 branches/zip:
* Remove old Innobase copyright lines from C source files
* Add a reference to the GPLv2 license as recommended by the lawyers
at Oracle Legal

[Step 5/28]
2009-02-17 08:59:22 +00:00
marko
6aab391620 branches/zip: Make innodb_adaptive_hash_index settable.
btr_search_disabled: Rename to btr_search_enabled and change the type
to char, so that it can be directly linked to the MySQL parameters.
Note that the variable is protected by btr_search_latch and
btr_search_enabled_mutex, a new mutex introduced in this patch.

btr_search_enabled_mutex: A new mutex, to protect btr_search_enabled
together with btr_search_latch.

buf_pool_drop_hash_index(): New function, to be called from
btr_search_disable().

btr_search_disable(), btr_search_enable(): Fix bugs.  These functions
were previously unused.

btr_search_guess_on_hash(), btr_search_build_page_hash_index():
Check btr_search_enabled once more, while holding btr_search_latch.

btr_cur_search_to_nth_level(): Note that the reads of btr_search_enabled
may be dirty and explain why it should not be a problem.

innobase_adaptive_hash_index: Remove. The variable btr_search_enabled will be used directly instead.

innodb_adaptive_hash_index_update(): New function, an update callback for
innodb_adaptive_hash_index.  This will call either btr_search_disable()
or btr_search_enable() when the value is assigned.  The functions will
be called even if the value does not appear to be changed, e.g., when
setting from TRUE to TRUE or FALSE to FALSE.

rb://85 approved by Heikki Tuuri.  This addresses Issue #163.
2009-01-30 21:30:29 +00:00
marko
b707b2e3b1 branches/zip: In r988, the function buf_block_align() was enclosed
within UNIV_DEBUG. The two remaining callers in non-debug builds,
btr_search_guess_on_hash() and btr_search_validate(), were rewritten
to call buf_page_hash_get().

To implement support for a resizeable buffer pool, the function
buf_block_align() had been rewritten to perform a page hash lookup in
the buffer pool. The caller was also made responsible for holding the
buffer pool mutex.

Because the page hash lookup is expensive and it has to be done while
holding the buffer pool mutex, implement buf_block_align() by pointer
arithmetics again, and make btr_search_guess_on_hash() call it. Note
that this will have to be adjusted if the interface to the resizeable
buffer pool is actually implemented.

rb://83 approved by Heikki Tuuri, to address Issue #161.

As a deviation from the approved patch, this patch also makes
btr_search_validate() (invoked by CHECK TABLE) check that
buf_pool->page_hash is consistent with buf_block_align().
2009-01-26 20:33:20 +00:00
marko
5dceabc908 branches/zip: buf_page_get_gen(): Remove the unused mode BUF_GET_NOWAIT.
This was noticed while investigating Issue #160.
2009-01-23 13:31:36 +00:00
marko
3b6075651d branches/zip: Non-functional change: Add some debug assertions and comments.
buf_page_t: Note that the LRU fields are protected by buf_pool_mutex
only, not block->mutex or buf_pool_zip_mutex.

buf_page_get_freed_page_clock(): Note that this is sometimes invoked
without mutex protection.

buf_pool_get_oldest_modification(): Note that the result may be out of
date.

buf_page_get_LRU_position(), buf_page_is_old(): Assert that the buffer
pool mutex is being held.

buf_page_release(): Assert that dirty blocks are in the flush list.
2009-01-12 16:56:11 +00:00
marko
179e75c559 branches/zip: Some non-functional changes related to Issue #155.
buf_page_struct: Note that space and offset are also protected by
buf_pool_mutex.  They are only assigned to by
buf_block_set_file_page().  Thus, it suffices for buf_flush_batch() to
hold just buf_pool_mutex when checking these fields.

buf_flush_try_page(): Rename "locked" to "is_s_latched", per Heikki's request.

buf_flush_batch(): Move the common statement mutex_exit(block_mutex)
from all if-else if-else branches before the if block.  Remove the
redundant test (buf_pool->init_flush[flush_type] == FALSE) that was
apparently copied from buf_flush_write_complete().

buf_flush_write_block_low(): Note why it is safe not to hold buf_pool_mutex
or block_mutex.  Enumerate the assumptions in debug assertions.
2009-01-09 20:27:40 +00:00
marko
b0ab87862c branches/zip: Introduce UNIV_AHI_DEBUG for debugging the adaptive hash
index without enabling UNIV_DEBUG.
2008-12-17 09:19:56 +00:00
marko
d9317eb699 branches/zip: Non-functional change:
buf_block_dbg_add_level(block, level): Define as an empty macro when
UNIV_SYNC_DEBUG is not defined.  Remove #ifdef UNIV_SYNC_DEBUG around
all invocations.
2008-09-22 06:59:58 +00:00
marko
7d69d45534 branches/zip: buf_LRU_free_block(): When buf_page_is_old(b), we incremented
buf_pool->LRU_old_len.  However, we forgot to check if buf_pool->LRU_old
happens to point to b's successor in the LRU list.  If it does, we must
assign buf_pool->LRU_old = b.  The following invariants hold:

In the LRU list, the "old" flag should grow monotonically, i.e., it is 0
for the first few items and 1 from thereafter.

If buf_pool->LRU_old != NULL, it must point to the first item with old=1
in the LRU list, and there must be buf_pool->LRU_old_len old items in the list.

This should fix Mantis issue#50 and issue#68.
2008-08-08 13:01:02 +00:00
vasil
b21c94dc01 branches/zip: Merge 2437:2485 from branches/5.1:
(r2478 was skipped for the obvious reason)

  ------------------------------------------------------------------------
  r2464 | vasil | 2008-05-19 17:59:42 +0300 (Mon, 19 May 2008) | 9 lines
  
  branches/5.1:
  
  Fix Bug#36600 SHOW STATUS takes a lot of CPU in buf_get_latched_pages_number
  
  by removing the Innodb_buffer_pool_pages_latched variable from
  SHOW STATUS output in non-UNIV_DEBUG compilation.
   
  Approved by:	Heikki
  
  ------------------------------------------------------------------------
  r2466 | calvin | 2008-05-20 01:37:14 +0300 (Tue, 20 May 2008) | 12 lines
  
  branches/5.1:
  
  Fix Bug#11894 innodb_file_per_table crashes w/ Windows .sym symbolic
  link hack
  
  The crash was due to un-handled error 3 (path not found). In the case
  of file per table, change the call to os_file_handle_error_no_exit()
  from os_file_handle_error(). Also, checks for full path pattern during
  table create (Windows only), which is used in symbolic link and temp
  table creation.
  
  Approved by:	Heikki
  ------------------------------------------------------------------------
  r2478 | sunny | 2008-05-23 08:29:08 +0300 (Fri, 23 May 2008) | 3 lines
  
  branches/5.1: Fix for bug# 36793. This is a back port from branches/zip. This
  code has been tested on a big-endian machine too.
  
  ------------------------------------------------------------------------
  r2480 | vasil | 2008-05-27 11:40:07 +0300 (Tue, 27 May 2008) | 11 lines
  
  branches/5.1:
  
  Fix Bug#36819 ut_usectime does not handle errors from gettimeofday
  
  by retrying gettimeofday() several times if it fails in ut_usectime().
  If it fails on all calls then return error to the caller to be handled
  at higher level.
  
  Update the variable innodb_row_lock_time_max in SHOW STATUS output only
  if ut_usectime() was successful.
  
  ------------------------------------------------------------------------
  r2482 | sunny | 2008-05-28 12:18:35 +0300 (Wed, 28 May 2008) | 5 lines
  
  branches/5.1: Fix for Bug#35602, "Failed to read auto-increment value from
  storage engine". The test for REPLACE was an error of ommission since it's
  classified as a simple INSERT. For REPLACE statements we don't acquire
  the special AUTOINC lock for AUTOINC_NEW_STYLE_LOCKING with this fix.
  
  ------------------------------------------------------------------------
  r2485 | vasil | 2008-05-28 16:01:14 +0300 (Wed, 28 May 2008) | 9 lines
  
  branches/5.1:
  
  Fix Bug#36149 Read buffer overflow in srv0start.c found during "make test"
  
  Use strncmp(3) instead of memcmp(3) to avoid reading past end of the string
  if it is empty (*str == '\0'). This bug is _not_ a buffer overflow.
  
  Discussed with:	Sunny (via IM)
  
  ------------------------------------------------------------------------
2008-06-06 15:24:58 +00:00
marko
77d8c98735 branches/zip: Rename ib_ulonglong to ib_uint64_t and ib_longlong to ib_int64_t. 2008-03-17 14:19:04 +00:00
marko
9d58e3ff99 branches/zip: Improve the LRU algorithm with a separate unzip_LRU list of
blocks that contains uncompressed and compressed frames.  This patch was
designed by Heikki and Inaam, implemented by Inaam, and refined and reviewed
by Marko and Sunny.

buf_buddy_n_frames, buf_buddy_min_n_frames, buf_buddy_max_n_frames: Remove.

buf_page_belongs_to_unzip_LRU(): New predicate:
bpage->zip.data && buf_page_get_state(bpage) == BUF_BLOCK_FILE_PAGE.

buf_pool_t, buf_block_t: Add the linked list unzip_LRU.  A block in the
regular LRU list is in unzip_LRU iff buf_page_belongs_to_unzip_LRU() holds.

buf_LRU_free_block(): Add a third return value to refine the case
"cannot free the block".

buf_LRU_search_and_free_block(): Update the documentation to reflect the
implementation.

buf_LRU_stat_t, buf_LRU_stat_cur, buf_LRU_stat_sum, buf_LRU_stat_arr[]:
Statistics for the unzip_LRU algorithm.

buf_LRU_stat_update(): New function: Update the statistics.  Called once
per second by srv_error_monitor_thread().

buf_LRU_validate(): Validate the unzip_LRU list as well.

buf_LRU_evict_from_unzip_LRU(): New predicate: Use the unzip_LRU before
falling back to the regular LRU?

buf_LRU_free_from_unzip_LRU_list(), buf_LRU_free_from_common_LRU_list():
Subfunctions of buf_LRU_search_and_free_block().

buf_LRU_search_and_free_block(): Reimplement.  Try to evict an uncompressed
page from the unzip_LRU list before falling back to evicting an entire block
from the common LRU list.

buf_unzip_LRU_remove_block_if_needed(): New function.

buf_unzip_LRU_add_block(): New function: Add a block to the unzip_LRU list.
2008-03-03 12:48:38 +00:00
marko
f7595d4278 branches/zip: buf_relocate(): Document and assert that bpage must be
in one of the states BUF_BLOCK_ZIP_DIRTY or BUF_BLOCK_ZIP_PAGE.
Note that the caller will have to relocate bpage->list.
2008-02-29 08:20:17 +00:00
marko
f03b5fad7b branches/zip: Replace __attribute with __attribute. 2008-02-29 08:13:55 +00:00
marko
788650088b branches/zip: Add a UNIV_INTERN qualifier to every global function declaration
in *.h files, so that the function signatures in the *.h and *.c files fully
match each other.

ut_dulint_sort(): Add a UNIV_INTERN qualifier also to the function definition.
2008-02-18 18:38:33 +00:00
marko
473d7c16a9 branches/zip: Introduce the page type code FIL_PAGE_TYPE_ZBLOB2 for
continuation pages containing compressed BLOBs.  The first compressed
BLOB page will be of type FIL_PAGE_TYPE_ZBLOB.
2008-01-24 08:12:02 +00:00
marko
66791e5a1b branches/zip: Free the buffer pool at shutdown.
buf_pool_free(): New function: Free all chunks of the buffer pool.

innobase_shutdown_for_mysql(): Call buf_pool_free() right before
ut_free_all_mem().
2008-01-16 12:44:44 +00:00
marko
7d18bba5e7 branches/zip: Add comments about the lock and latch protection of externally
stored columns (BLOBs).

btr_copy_blob_prefix(), btr_copy_zblob_prefix(),
btr_copy_externally_stored_field_prefix_low(),
btr_copy_externally_stored_field_prefix(),
btr_copy_externally_stored_field(),
btr_rec_copy_externally_stored_field():
Note that the page containing the clustered index record that points to
the BLOB must be latched.

btr_copy_zblob_prefix(): Note that there is no latch on the page, and thus
all accesses to a given page via this function must be covered by the same
set of locks or latches.

btr_copy_zblob_prefix(): Note that the block acquired by
buf_page_get_zip() is protected by an exclusive table lock or
or by a latch on the clustered index record.
2008-01-16 10:45:14 +00:00
marko
523a8a0e8d branches/zip: Add instrumentation for prohibiting the release of
the buffer pool mutex.  The instrumentation can be activated by
defining UNIV_DEBUG or UNIV_BUF_DEBUG at compilation time.

buf_pool_mutex_exit_forbidden: New variable.  When this is nonzero,
an assertion will fail in buf_pool_mutex_exit().

buf_pool_mutex_exit_forbid(): Macro for declaring that the buffer pool
mutex must not be released.  Calls may be nested.

buf_pool_mutex_exit_allow(): Macro for declaring that the buffer pool
mutex may be released.  Calls may be nested.

buf_LRU_search_and_free_block(): Prohibit buf_pool_mutex_exit() in the
scope of the function.

buf_LRU_free_block(): Prohibit buf_pool_mutex_exit() in buf_buddy_alloc()
and buf_buddy_free().

buf_LRU_block_remove_hashed_page(): Prohibit buf_pool_mutex_exit()
in buf_buddy_free().
2008-01-10 09:51:57 +00:00
marko
3bb405841f branches/zip: Implement wrappers for all operations on the buffer pool mutex.
buf_pool->mutex: Rename to buf_pool_mutex, so that the wrappers will have
to be used when changes are merged from other source trees.

buf_pool->zip_mutex: Rename to buf_pool_zip_mutex.

buf_pool_mutex_own(), buf_pool_mutex_enter(), buf_pool_mutex_exit():
Wrappers for buf_pool_mutex.
2008-01-10 09:37:13 +00:00
marko
247d1449d1 branches/zip: Minor cleanup.
buf_page_get_release_on_io(): Removed this unused function.

ibuf_build_entry_from_ibuf_rec(): Justify why it is not necessary to
add system columns to the dummy table pointed to by the dummy secondary index.

page_zip_rec_set_deleted(): Add a page_zip_validate() assertion.
2007-11-28 11:22:25 +00:00
marko
8085e89f07 branches/zip: buf_block_get_frame(): Add missing parenthesis. 2007-10-29 14:03:57 +00:00
marko
a4b26c4ffb branches/zip: buf_pool_t: Add n_pend_unzip. Display it in buf_print(). 2007-10-26 08:53:36 +00:00
marko
d967aaa65b branches/zip: Remove const warnings reported by GCC 4.2.1.
page_cur_set_before_first(), page_cur_set_after_last(),
page_cur_position(): Add const qualifiers to buf_block_t and rec.
A better solution would be to define a const_page_cur_t and a
set of accessors, but it would lead to severe code duplication.

page_rec_get_n_recs_before(): Add const qualifiers.

page_dir_get_nth_slot(): Define as a const-preserving macro.

page_dir_slot_get_rec(), page_dir_slot_get_n_owned(),
page_dir_find_owner_slot(), page_check_dir(): Add const qualifiers.

page_rec_get_next_low(): Add const qualifiers.

page_rec_get_next_const(), page_rec_get_prev_const(): New functions,
based on the const-less page_rec_get_next() and page_rec_get_prev().

page_cur_get_page(), page_cur_get_block(), page_cur_get_page_zip(),
page_cur_get_rec(): Define as const-preserving macros.

page_cur_try_search_shortcut(), page_cur_search_with_match():
Add const qualifiers.

buf_page_get_mutex(): Add a const qualifier to buf_page_t*.

rec_get_next_ptr_const(): Const variant of rec_get_next_ptr().
2007-10-18 07:12:05 +00:00
marko
6557ba5342 branches/zip: Silence most GCC 4.2.1 warnings about const pointers.
For some reason, GCC 4.2.1 ignores casts (for removing constness)
in calls to inline functions.

page_align(), ut_align_down(): Make the parameter const void*, but still
return a non-const pointer.  This is ugly, but these functions cannot be
replaced with a const-preserving macro in a portable way, given that
the pointer argument is not always pointing to bytes.

buf_block_get_page_zip(): Implement as a const-preserving macro.

buf_frame_get_page_zip(), buf_block_align(): Add const qualifiers.

lock_rec_get_prev(): Silence GCC 4.2.1 warnings.

mlog_write_initial_log_record(), mlog_write_initial_log_record_fast(),
mtr_memo_contains(): Add const qualifier to the pointer.

page_header_get_ptr(): Rewrite as page_header_get_offs(), and
implement as a macro that calls this function.
2007-10-03 12:22:29 +00:00
marko
3d57033064 branches/zip: Optimize buf_page_try_get_func().
buf_block_hash_get(): New function, similar to buf_page_hash_get().

buf_page_get_block(): Remove the const qualifiers.  This is a low-level
function, and the operations on block->mutex are non-const.

buf_page_try_get_func(): Implement with lower-level predicates, somewhat
similar to buf_page_get_known_nowait().

lock_rec_print(): Remove the unused variable zip_size and the
call to fil_space_get_zip_size().  Adapt to buf_page_try_get() returning
a const pointer.
2007-10-01 07:32:45 +00:00
marko
20d7ea9851 branches/zip: Add the function buf_page_get_block(), for converting
from buf_page_t* to buf_block_t*.

buf_page_can_relocate(): Replace the incorrect __attribute__((const))
with __attribute__((pure)).
2007-09-28 12:04:04 +00:00
marko
44f9d06969 branches/zip: Define buf_block_get_frame() as a const-preserving macro. 2007-09-28 06:26:21 +00:00
vasil
e05b8e86b9 branches/zip:
Move part of the code from lock_rec_print() in a separate function
buf_page_try_get() because the same functionality is needed in
INFORMATION SCHEMA code.

Approved by:	Heikki
2007-09-27 14:35:18 +00:00
marko
d662c3c656 branches/zip: Merge 1575:1664 from trunk. 2007-08-01 11:18:43 +00:00
marko
dd529ee402 branches/zip: When reading pages for merging buffered inserts, request that
the pages be decompressed.

buf_read_page_low(), buf_page_init_for_read(): Add parameter "unzip".
2007-05-06 13:21:59 +00:00
marko
5ac6f3217d branches/zip: buf_page_init_for_read(): Do not allocate an uncompressed page
frame when reading compressed pages, unless crash recovery is in progress.

buf_page_read_low(): Adapt for buf_page_init_for_read() returning
buf_page_t* instead of buf_block_t*.
2007-02-08 12:03:03 +00:00
marko
7315b06291 branches/zip: buf_page_init_for_read(), buf_page_create(): Note in the
function comments that buf_page_init_for_read() does not perform the
state transition to FILE_PAGE.  This should have been done in r1286.
2007-02-08 09:08:11 +00:00
marko
329c469e70 branches/zip: Do not decompress blocks in buf_page_init_for_read(),
but in buf_page_get_gen().  Adjust comments.  This prevents
unnecessary decompression in read-ahead when the compressed block
exists in the buffer pool.

If the block does not exist in the buffer pool, read-ahead will still
allocate an uncompressed page and decompress the block.

Move buf_block_init_low() and buf_zip_decompress() earlier in the file,
because some compilers are unable to inline functions that are defined
after the invocation.

buf_page_get_gen(): Decompress the block if needed.

buf_page_init_for_read(): Do not decompress.
2007-02-07 13:59:43 +00:00
marko
3b5c872916 branches/zip: buf_page_t: Add the in_page_hash and in_zip_hash
for extra validation in UNIV_DEBUG builds.
2007-01-24 10:36:05 +00:00
marko
88efbdb335 branches/zip: When retrieving compressed BLOBs, avoid allocating
uncompressed page frames.

buf_page_get_zip(), buf_page_release_zip(): New functions, used
by btr_copy_zblob_prefix().

btr_copy_zblob_prefix(): Do not call inflateEnd().
2007-01-18 23:10:49 +00:00
marko
fff329cd3d branches/zip: Remove the fil_space_get_zip_size() call from
buf_page_get_gen().  This saves one mutex operation per block request.

buf_page_get_gen(), various macros and functions: Add parameter zip_size.

btr_node_ptr_get_child(): Add parameter index.

fil_space_get_latch(): Add optional output parameter zip_size.

fil_space_get_zip_size(): Return 0 for space id==0, because the
system tablespace is never compressed.

fsp_header_init(): Remove the parameter zip_size.

ibuf_free_excess_pages(): Remove the parameter zip_size.

trx_rseg_t, trx_undo_t: Add field zip_size.

xdes_lst_get_next(): Remove, unused.
2007-01-18 09:59:00 +00:00
marko
0c19de98c0 branches/zip: buf_page_io_complete(): Change the parameter type from
buf_block_t* to buf_page_t*.  Handle compressed-only blocks.
2007-01-10 14:36:39 +00:00
marko
8af159117e branches/zip: buf_page_t: Introduce the field in_flush_list #ifdef UNIV_DEBUG.
buf_flush_batch(): Remove the local variable "found".
2007-01-09 12:35:42 +00:00
marko
62391d4280 branches/zip: buf_page_peek(): Return TRUE also if the page exists in the
buffer pool in compressed form only.

buf_page_peek_block(): Remove.

mutex_enter_fast_func: Remove.
2007-01-05 11:19:56 +00:00
marko
b75e9777dd branches/zip: buf_pool_page_hash_rebuild(): Rebuild also buf_pool->zip_hash
and add compressed-only pages to buf_pool->page_hash.

BUF_POOL_ZIP_FOLD(), BUF_POOL_ZIP_FOLD_PTR(), BUF_POOL_ZIP_FOLD_BPAGE():
Macros for computing buf_pool->zip_hash fold values.  Make use of these
in buf0buddy.c.

buf0buddy.c: Replace some ptr == ut_align_down(ptr, ...) in assertions with
!ut_align_offset(ptr, ...).
2007-01-05 10:49:56 +00:00
marko
14b99876d0 branches/zip: Allow dirty blocks to be relocated. Allow a transition
to BUF_BLOCK_ZIP_DIRTY (discarding the uncompressed page corresponding
to a modified compressed page that has not been flushed to disk).

buf_page_can_relocate(): New function, modelled after
buf_flush_ready_for_replace().

buf_LRU_free_block(): Allow the transition to BUF_BLOCK_ZIP_DIRTY.

buf_flush_insert_into_flush_list(): Make the prototype public.

buf_buddy_relocate(): Remove an unnecessary switch statement.
Use buf_page_can_relocate() instead of buf_flush_ready_for_replace().

buf_page_peek(): Made UNIV_INLINE.

Document UNIV_ZIP_DEBUG.
2007-01-04 21:40:10 +00:00
marko
90b7b8abf5 branches/zip: Add __attribute__((const)) or __attribute__((pure))
to all fold functions.
2007-01-03 12:34:54 +00:00
marko
13049a9e3a branches/zip: Allow the buddy allocator to work for 16-kilobyte pages,
twice the maximum block size of the buddy system.

buf_page_t: Note that state may change from BUF_BLOCK_READY_FOR_USE
to BUF_BLOCK_MEMORY without buf_page_get_mutex() protection
[only buf_pool->mutex].

buf_buddy_get_slot(): Extend the output to BUF_BUDDY_SIZES.

buf_buddy_alloc(), buf_buddy_free(): Allow sizes up to UNIV_PAGE_SIZE.

buf_buddy_alloc_low(), buf_buddy_free_low(), buf_buddy_alloc_clean():
Allow i==BUF_BUDDY_SIZES.
2006-12-20 15:56:58 +00:00
marko
b42f76a12b branches/zip: Add the debug function buf_pool_contains_zip() #ifdef UNIV_DEBUG. 2006-12-19 22:12:44 +00:00
marko
9326dca349 branches/zip: Correct some bugs in the buddy allocator and add debug code.
buf_buddy_alloc_zip() [UNIV_DEBUG]: Byte-fill the allocated blocks with ~i.

buf_buddy_block_free() [UNIV_DEBUG]: Clear the frame before releasing it
to the buffer pool.

buf_buddy_alloc_from() [UNIV_DEBUG]: Byte-fill the free blocks with j.

buf_buddy_relocate(): Allow the buf_page_hash_get() lookup to fail,
and note the reason.

buf_buddy_free_low(): Correctly compute the address of the combined free block.

buf_page_struct: Clarify the mutex protection rules.  Note that
the pointer zip.data is also protected by buf_pool->mutex.
2006-12-19 12:38:18 +00:00
marko
255a9a878a branches/zip: Refactor some code for relocating buffer control blocks.
buf_relocate(): New function, split from buf_buddy_relocate().
2006-12-14 15:15:51 +00:00
marko
2208d25976 branches/zip: Make use of the previously unused state BUF_BLOCK_MEMORY.
buf_LRU_get_free_block(): Document that the block is in the state
BUF_BLOCK_READY_FOR_USE.

buf_block_alloc(): Change the state of the block to BUF_BLOCK_MEMORY
and document it.

Replace those invocations of buf_block_alloc() with
buf_LRU_get_free_block() where the allocated block is used for buffer
pool input and output.  However, temporary copies of B-tree pages
during reorganization are not used for file I/O, and such blocks are
still allocated with buf_block_alloc().
2006-12-13 14:58:54 +00:00
marko
76c69c3610 branches/zip: Add buf_pool->zip_hash for keeping track on pages allocated
to the buddy system for allocating compressed pages and their descriptors.

buf_buddy_free_block(): New function: Deallocate the buffer frame.

buf_buddy_free(), buf_buddy_free_low(): Return void instead of a pointer
to a freed buffer frame.
2006-12-11 09:54:13 +00:00