Commit 0c4879da authored by marko's avatar marko

branches/innodb+: Revert some changes that make the code differ

from branches/zip.

btr_cur_optimistic_delete(): Split a too long line in the way it is
split in branches/zip.

buf_page_get_gen(): Add missing space in the function comment.

buf_print_io(): Restoer a removed space to the printout.

univ.i: Remove C++-style (or C99-style) comments.

buf0buf.h: Undo the white-space changes to the wrapper macros of
buf_page_get_gen().

ibuf_update_free_bits_low(): Revert the changes.  Restore the assertion
that this function must not be invoked on compressed pages.  The function
ibuf_update_free_bits_zip() is for compressed pages.

ibuf_insert_to_index_page(): Undo a white-space change.
parent e5833be8
...@@ -2897,7 +2897,8 @@ btr_cur_optimistic_delete( ...@@ -2897,7 +2897,8 @@ btr_cur_optimistic_delete(
ut_a(!page_zip || page_zip_validate(page_zip, page)); ut_a(!page_zip || page_zip_validate(page_zip, page));
#endif /* UNIV_ZIP_DEBUG */ #endif /* UNIV_ZIP_DEBUG */
if (dict_index_is_clust(cursor->index) || !page_is_leaf(page)) { if (dict_index_is_clust(cursor->index)
|| !page_is_leaf(page)) {
/* The insert buffer does not handle /* The insert buffer does not handle
inserts to clustered indexes or to non-leaf inserts to clustered indexes or to non-leaf
pages of secondary index B-trees. */ pages of secondary index B-trees. */
......
...@@ -1862,7 +1862,7 @@ buf_page_get_gen( ...@@ -1862,7 +1862,7 @@ buf_page_get_gen(
buf_block_t* guess, /* in: guessed block or NULL */ buf_block_t* guess, /* in: guessed block or NULL */
ulint mode, /* in: BUF_GET, BUF_GET_IF_IN_POOL, ulint mode, /* in: BUF_GET, BUF_GET_IF_IN_POOL,
BUF_GET_NO_LATCH, BUF_GET_NOWAIT or BUF_GET_NO_LATCH, BUF_GET_NOWAIT or
BUF_GET_IF_IN_POOL_OR_WATCH*/ BUF_GET_IF_IN_POOL_OR_WATCH */
const char* file, /* in: file name */ const char* file, /* in: file name */
ulint line, /* in: line where called */ ulint line, /* in: line where called */
mtr_t* mtr) /* in: mini-transaction */ mtr_t* mtr) /* in: mini-transaction */
...@@ -3715,7 +3715,7 @@ buf_print_io( ...@@ -3715,7 +3715,7 @@ buf_print_io(
fprintf(file, fprintf(file,
"Buffer pool size %lu\n" "Buffer pool size %lu\n"
"Free buffers %lu\n" "Free buffers %lu\n"
"Database pages %lu\n" "Database pages %lu\n"
"Modified db pages %lu\n" "Modified db pages %lu\n"
"Pending reads %lu\n" "Pending reads %lu\n"
......
...@@ -890,8 +890,10 @@ ibuf_update_free_bits_low( ...@@ -890,8 +890,10 @@ ibuf_update_free_bits_low(
performed to the page */ performed to the page */
mtr_t* mtr) /* in/out: mtr */ mtr_t* mtr) /* in/out: mtr */
{ {
ulint after;
ulint before; ulint before;
ulint after;
ut_a(!buf_block_get_page_zip(block));
before = ibuf_index_page_calc_free_bits(0, max_ins_size); before = ibuf_index_page_calc_free_bits(0, max_ins_size);
...@@ -3306,8 +3308,8 @@ dump: ...@@ -3306,8 +3308,8 @@ dump:
return; return;
} }
low_match = page_cur_search( low_match = page_cur_search(block, index, entry,
block, index, entry, PAGE_CUR_LE, &page_cur); PAGE_CUR_LE, &page_cur);
if (low_match == dtuple_get_n_fields(entry)) { if (low_match == dtuple_get_n_fields(entry)) {
buf_block_t* block; buf_block_t* block;
......
...@@ -172,22 +172,20 @@ read the contents of the page unless you know it is safe. Do not modify ...@@ -172,22 +172,20 @@ read the contents of the page unless you know it is safe. Do not modify
the contents of the page! We have separated this case, because it is the contents of the page! We have separated this case, because it is
error-prone programming not to set a latch, and it should be used error-prone programming not to set a latch, and it should be used
with care. */ with care. */
#define buf_page_get_with_no_latch(SP, ZS, OF, MTR) buf_page_get_gen(\ #define buf_page_get_with_no_latch(SP, ZS, OF, MTR) buf_page_get_gen(\
SP, ZS, OF, RW_NO_LATCH, NULL,\ SP, ZS, OF, RW_NO_LATCH, NULL,\
BUF_GET_NO_LATCH, \ BUF_GET_NO_LATCH, __FILE__, __LINE__, MTR)
__FILE__, __LINE__, MTR)
/****************************************************************** /******************************************************************
NOTE! The following macros should be used instead of buf_page_get_gen, to NOTE! The following macros should be used instead of buf_page_get_gen, to
improve debugging. Only values RW_S_LATCH and RW_X_LATCH are allowed as LA! */ improve debugging. Only values RW_S_LATCH and RW_X_LATCH are allowed as LA! */
#define buf_page_get_nowait(SP, ZS, OF, LA, MTR) buf_page_get_gen(\ #define buf_page_get_nowait(SP, ZS, OF, LA, MTR) buf_page_get_gen(\
SP, ZS, OF, LA, NULL,\ SP, ZS, OF, LA, NULL,\
BUF_GET_NOWAIT, \ BUF_GET_NOWAIT, __FILE__, __LINE__, MTR)
__FILE__, __LINE__, MTR)
/****************************************************************** /******************************************************************
NOTE! The following macros should be used instead of NOTE! The following macros should be used instead of
buf_page_optimistic_get_func, to improve debugging. Only values RW_S_LATCH and buf_page_optimistic_get_func, to improve debugging. Only values RW_S_LATCH and
RW_X_LATCH are allowed as LA! */ RW_X_LATCH are allowed as LA! */
#define buf_page_optimistic_get(LA, BL, MC, MTR) \ #define buf_page_optimistic_get(LA, BL, MC, MTR) \
buf_page_optimistic_get_func(LA, BL, MC, __FILE__, __LINE__, MTR) buf_page_optimistic_get_func(LA, BL, MC, __FILE__, __LINE__, MTR)
/************************************************************************ /************************************************************************
This is the general function used to get optimistic access to a database This is the general function used to get optimistic access to a database
...@@ -268,7 +266,7 @@ buf_page_get_gen( ...@@ -268,7 +266,7 @@ buf_page_get_gen(
buf_block_t* guess, /* in: guessed block or NULL */ buf_block_t* guess, /* in: guessed block or NULL */
ulint mode, /* in: BUF_GET, BUF_GET_IF_IN_POOL, ulint mode, /* in: BUF_GET, BUF_GET_IF_IN_POOL,
BUF_GET_NO_LATCH, BUF_GET_NOWAIT or BUF_GET_NO_LATCH, BUF_GET_NOWAIT or
BUF_GET_IF_IN_POOL_WATCH*/ BUF_GET_IF_IN_POOL_WATCH */
const char* file, /* in: file name */ const char* file, /* in: file name */
ulint line, /* in: line where called */ ulint line, /* in: line where called */
mtr_t* mtr); /* in: mini-transaction */ mtr_t* mtr); /* in: mini-transaction */
......
...@@ -160,9 +160,6 @@ operations (very slow); also UNIV_DEBUG must be defined */ ...@@ -160,9 +160,6 @@ operations (very slow); also UNIV_DEBUG must be defined */
for compressed pages */ for compressed pages */
#endif #endif
//#define UNIV_DEBUG
//#define UNIV_SYNC_DEBUG
//#define UNIV_IBUF_DEBUG
#define UNIV_BTR_DEBUG /* check B-tree links */ #define UNIV_BTR_DEBUG /* check B-tree links */
#define UNIV_LIGHT_MEM_DEBUG /* light memory debugging */ #define UNIV_LIGHT_MEM_DEBUG /* light memory debugging */
......
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