Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
eddd572a
Commit
eddd572a
authored
Feb 27, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Split UNIV_IBUF_COUNT_DEBUG from UNIV_IBUF_DEBUG.
parent
d52f32b3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
23 deletions
+24
-23
buf/buf0buf.c
buf/buf0buf.c
+8
-8
buf/buf0flu.c
buf/buf0flu.c
+1
-1
ibuf/ibuf0ibuf.c
ibuf/ibuf0ibuf.c
+12
-12
include/ibuf0ibuf.h
include/ibuf0ibuf.h
+1
-1
include/univ.i
include/univ.i
+2
-1
No files found.
buf/buf0buf.c
View file @
eddd572a
...
@@ -1588,7 +1588,7 @@ buf_page_get_zip(
...
@@ -1588,7 +1588,7 @@ buf_page_get_zip(
}
}
}
}
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ut_a
(
ibuf_count_get
(
buf_page_get_space
(
bpage
),
ut_a
(
ibuf_count_get
(
buf_page_get_space
(
bpage
),
buf_page_get_page_no
(
bpage
))
==
0
);
buf_page_get_page_no
(
bpage
))
==
0
);
#endif
#endif
...
@@ -1992,7 +1992,7 @@ buf_page_get_gen(
...
@@ -1992,7 +1992,7 @@ buf_page_get_gen(
buf_read_ahead_linear
(
space
,
zip_size
,
offset
);
buf_read_ahead_linear
(
space
,
zip_size
,
offset
);
}
}
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ut_a
(
ibuf_count_get
(
buf_block_get_space
(
block
),
ut_a
(
ibuf_count_get
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
block
))
==
0
);
buf_block_get_page_no
(
block
))
==
0
);
#endif
#endif
...
@@ -2111,7 +2111,7 @@ buf_page_optimistic_get_func(
...
@@ -2111,7 +2111,7 @@ buf_page_optimistic_get_func(
buf_block_get_page_no
(
block
));
buf_block_get_page_no
(
block
));
}
}
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ut_a
(
ibuf_count_get
(
buf_block_get_space
(
block
),
ut_a
(
ibuf_count_get
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
block
))
==
0
);
buf_block_get_page_no
(
block
))
==
0
);
#endif
#endif
...
@@ -2204,7 +2204,7 @@ buf_page_get_known_nowait(
...
@@ -2204,7 +2204,7 @@ buf_page_get_known_nowait(
ut_a
(
block
->
page
.
file_page_was_freed
==
FALSE
);
ut_a
(
block
->
page
.
file_page_was_freed
==
FALSE
);
#endif
#endif
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ut_a
((
mode
==
BUF_KEEP_OLD
)
ut_a
((
mode
==
BUF_KEEP_OLD
)
||
(
ibuf_count_get
(
buf_block_get_space
(
block
),
||
(
ibuf_count_get
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
block
))
==
0
));
buf_block_get_page_no
(
block
))
==
0
));
...
@@ -2558,7 +2558,7 @@ buf_page_create(
...
@@ -2558,7 +2558,7 @@ buf_page_create(
block
=
(
buf_block_t
*
)
buf_page_hash_get
(
space
,
offset
);
block
=
(
buf_block_t
*
)
buf_page_hash_get
(
space
,
offset
);
if
(
block
&&
buf_page_in_file
(
&
block
->
page
))
{
if
(
block
&&
buf_page_in_file
(
&
block
->
page
))
{
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ut_a
(
ibuf_count_get
(
space
,
offset
)
==
0
);
ut_a
(
ibuf_count_get
(
space
,
offset
)
==
0
);
#endif
#endif
#ifdef UNIV_DEBUG_FILE_ACCESSES
#ifdef UNIV_DEBUG_FILE_ACCESSES
...
@@ -2655,7 +2655,7 @@ buf_page_create(
...
@@ -2655,7 +2655,7 @@ buf_page_create(
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
ut_a
(
++
buf_dbg_counter
%
357
||
buf_validate
());
ut_a
(
++
buf_dbg_counter
%
357
||
buf_validate
());
#endif
/* UNIV_DEBUG || UNIV_BUF_DEBUG */
#endif
/* UNIV_DEBUG || UNIV_BUF_DEBUG */
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ut_a
(
ibuf_count_get
(
buf_block_get_space
(
block
),
ut_a
(
ibuf_count_get
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
block
))
==
0
);
buf_block_get_page_no
(
block
))
==
0
);
#endif
#endif
...
@@ -2808,7 +2808,7 @@ buf_page_io_complete(
...
@@ -2808,7 +2808,7 @@ buf_page_io_complete(
mutex_enter
(
&
(
buf_pool
->
mutex
));
mutex_enter
(
&
(
buf_pool
->
mutex
));
mutex_enter
(
buf_page_get_mutex
(
bpage
));
mutex_enter
(
buf_page_get_mutex
(
bpage
));
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
if
(
io_type
==
BUF_IO_WRITE
||
uncompressed
)
{
if
(
io_type
==
BUF_IO_WRITE
||
uncompressed
)
{
/* For BUF_IO_READ of compressed-only blocks, the
/* For BUF_IO_READ of compressed-only blocks, the
buffered operations will be merged by buf_page_get_gen()
buffered operations will be merged by buf_page_get_gen()
...
@@ -2950,7 +2950,7 @@ buf_validate(void)
...
@@ -2950,7 +2950,7 @@ buf_validate(void)
block
))
block
))
==
&
block
->
page
);
==
&
block
->
page
);
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ut_a
(
buf_page_get_io_fix
(
&
block
->
page
)
ut_a
(
buf_page_get_io_fix
(
&
block
->
page
)
==
BUF_IO_READ
==
BUF_IO_READ
||
!
ibuf_count_get
(
buf_block_get_space
(
||
!
ibuf_count_get
(
buf_block_get_space
(
...
...
buf/buf0flu.c
View file @
eddd572a
...
@@ -675,7 +675,7 @@ buf_flush_write_block_low(
...
@@ -675,7 +675,7 @@ buf_flush_write_block_low(
ut_ad
(
buf_page_in_file
(
bpage
));
ut_ad
(
buf_page_in_file
(
bpage
));
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ut_a
(
ibuf_count_get
(
bpage
->
space
,
bpage
->
offset
)
==
0
);
ut_a
(
ibuf_count_get
(
bpage
->
space
,
bpage
->
offset
)
==
0
);
#endif
#endif
ut_ad
(
bpage
->
newest_modification
!=
0
);
ut_ad
(
bpage
->
newest_modification
!=
0
);
...
...
ibuf/ibuf0ibuf.c
View file @
eddd572a
...
@@ -144,7 +144,7 @@ static ulint ibuf_rnd = 986058871;
...
@@ -144,7 +144,7 @@ static ulint ibuf_rnd = 986058871;
ulint
ibuf_flush_count
=
0
;
ulint
ibuf_flush_count
=
0
;
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
/* Dimensions for the ibuf_count array */
/* Dimensions for the ibuf_count array */
#define IBUF_COUNT_N_SPACES 500
#define IBUF_COUNT_N_SPACES 500
#define IBUF_COUNT_N_PAGES 2000
#define IBUF_COUNT_N_PAGES 2000
...
@@ -318,7 +318,7 @@ ibuf_tree_root_get(
...
@@ -318,7 +318,7 @@ ibuf_tree_root_get(
return
(
buf_block_get_frame
(
block
));
return
(
buf_block_get_frame
(
block
));
}
}
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
/**********************************************************************
/**********************************************************************
Gets the ibuf count for a given page. */
Gets the ibuf count for a given page. */
...
@@ -380,7 +380,7 @@ ibuf_init_at_db_start(void)
...
@@ -380,7 +380,7 @@ ibuf_init_at_db_start(void)
ibuf
->
size
=
0
;
ibuf
->
size
=
0
;
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
{
{
ulint
i
,
j
;
ulint
i
,
j
;
...
@@ -695,7 +695,7 @@ ibuf_bitmap_page_set_bits(
...
@@ -695,7 +695,7 @@ ibuf_bitmap_page_set_bits(
#endif
#endif
ut_ad
(
ut_is_2pow
(
zip_size
));
ut_ad
(
ut_is_2pow
(
zip_size
));
ut_ad
(
mtr_memo_contains_page
(
mtr
,
page
,
MTR_MEMO_PAGE_X_FIX
));
ut_ad
(
mtr_memo_contains_page
(
mtr
,
page
,
MTR_MEMO_PAGE_X_FIX
));
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ut_a
((
bit
!=
IBUF_BITMAP_BUFFERED
)
||
(
val
!=
FALSE
)
ut_a
((
bit
!=
IBUF_BITMAP_BUFFERED
)
||
(
val
!=
FALSE
)
||
(
0
==
ibuf_count_get
(
page_get_space_id
(
page
),
||
(
0
==
ibuf_count_get
(
page_get_space_id
(
page
),
page_no
)));
page_no
)));
...
@@ -2671,7 +2671,7 @@ ibuf_insert_low(
...
@@ -2671,7 +2671,7 @@ ibuf_insert_low(
page */
page */
buffered
=
ibuf_get_volume_buffered
(
&
pcur
,
space
,
page_no
,
&
mtr
);
buffered
=
ibuf_get_volume_buffered
(
&
pcur
,
space
,
page_no
,
&
mtr
);
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ut_a
((
buffered
==
0
)
||
ibuf_count_get
(
space
,
page_no
));
ut_a
((
buffered
==
0
)
||
ibuf_count_get
(
space
,
page_no
));
#endif
#endif
mtr_start
(
&
bitmap_mtr
);
mtr_start
(
&
bitmap_mtr
);
...
@@ -2760,7 +2760,7 @@ ibuf_insert_low(
...
@@ -2760,7 +2760,7 @@ ibuf_insert_low(
}
}
function_exit:
function_exit:
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
if
(
err
==
DB_SUCCESS
)
{
if
(
err
==
DB_SUCCESS
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"Incrementing ibuf count of space %lu page %lu
\n
"
"Incrementing ibuf count of space %lu page %lu
\n
"
...
@@ -3017,7 +3017,7 @@ ibuf_delete_rec(
...
@@ -3017,7 +3017,7 @@ ibuf_delete_rec(
success
=
btr_cur_optimistic_delete
(
btr_pcur_get_btr_cur
(
pcur
),
mtr
);
success
=
btr_cur_optimistic_delete
(
btr_pcur_get_btr_cur
(
pcur
),
mtr
);
if
(
success
)
{
if
(
success
)
{
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
fprintf
(
stderr
,
fprintf
(
stderr
,
"Decrementing ibuf count of space %lu page %lu
\n
"
"Decrementing ibuf count of space %lu page %lu
\n
"
"from %lu by 1
\n
"
,
space
,
page_no
,
"from %lu by 1
\n
"
,
space
,
page_no
,
...
@@ -3084,7 +3084,7 @@ ibuf_delete_rec(
...
@@ -3084,7 +3084,7 @@ ibuf_delete_rec(
FALSE
,
mtr
);
FALSE
,
mtr
);
ut_a
(
err
==
DB_SUCCESS
);
ut_a
(
err
==
DB_SUCCESS
);
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ibuf_count_set
(
space
,
page_no
,
ibuf_count_get
(
space
,
page_no
)
-
1
);
ibuf_count_set
(
space
,
page_no
,
ibuf_count_get
(
space
,
page_no
)
-
1
);
#else
#else
UT_NOT_USED
(
space
);
UT_NOT_USED
(
space
);
...
@@ -3371,7 +3371,7 @@ ibuf_merge_or_delete_for_page(
...
@@ -3371,7 +3371,7 @@ ibuf_merge_or_delete_for_page(
}
}
reset_bit:
reset_bit:
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
if
(
ibuf_count_get
(
space
,
page_no
)
>
0
)
{
if
(
ibuf_count_get
(
space
,
page_no
)
>
0
)
{
/* btr_print_tree(ibuf_data->index->tree, 100);
/* btr_print_tree(ibuf_data->index->tree, 100);
ibuf_print(); */
ibuf_print(); */
...
@@ -3426,7 +3426,7 @@ ibuf_merge_or_delete_for_page(
...
@@ -3426,7 +3426,7 @@ ibuf_merge_or_delete_for_page(
}
}
ibuf_exit
();
ibuf_exit
();
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ut_a
(
ibuf_count_get
(
space
,
page_no
)
==
0
);
ut_a
(
ibuf_count_get
(
space
,
page_no
)
==
0
);
#endif
#endif
}
}
...
@@ -3629,7 +3629,7 @@ ibuf_print(
...
@@ -3629,7 +3629,7 @@ ibuf_print(
FILE
*
file
)
/* in: file where to print */
FILE
*
file
)
/* in: file where to print */
{
{
ibuf_data_t
*
data
;
ibuf_data_t
*
data
;
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
ulint
i
;
ulint
i
;
#endif
#endif
...
@@ -3647,7 +3647,7 @@ ibuf_print(
...
@@ -3647,7 +3647,7 @@ ibuf_print(
(
ulong
)
data
->
n_inserts
,
(
ulong
)
data
->
n_inserts
,
(
ulong
)
data
->
n_merged_recs
,
(
ulong
)
data
->
n_merged_recs
,
(
ulong
)
data
->
n_merges
);
(
ulong
)
data
->
n_merges
);
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
for
(
i
=
0
;
i
<
IBUF_COUNT_N_PAGES
;
i
++
)
{
for
(
i
=
0
;
i
<
IBUF_COUNT_N_PAGES
;
i
++
)
{
if
(
ibuf_count_get
(
data
->
space
,
i
)
>
0
)
{
if
(
ibuf_count_get
(
data
->
space
,
i
)
>
0
)
{
...
...
include/ibuf0ibuf.h
View file @
eddd572a
...
@@ -269,7 +269,7 @@ ibuf_parse_bitmap_init(
...
@@ -269,7 +269,7 @@ ibuf_parse_bitmap_init(
byte
*
end_ptr
,
/* in: buffer end */
byte
*
end_ptr
,
/* in: buffer end */
buf_block_t
*
block
,
/* in: block or NULL */
buf_block_t
*
block
,
/* in: block or NULL */
mtr_t
*
mtr
);
/* in: mtr or NULL */
mtr_t
*
mtr
);
/* in: mtr or NULL */
#ifdef UNIV_IBUF_DEBUG
#ifdef UNIV_IBUF_
COUNT_
DEBUG
/**********************************************************************
/**********************************************************************
Gets the ibuf count for a given page. */
Gets the ibuf count for a given page. */
...
...
include/univ.i
View file @
eddd572a
...
@@ -90,7 +90,8 @@ memory is read outside the allocated blocks. */
...
@@ -90,7 +90,8 @@ memory is read outside the allocated blocks. */
#
define
UNIV_HASH_DEBUG
/* debug HASH_ macros */
#
define
UNIV_HASH_DEBUG
/* debug HASH_ macros */
#
define
UNIV_LIST_DEBUG
/* debug UT_LIST_ macros */
#
define
UNIV_LIST_DEBUG
/* debug UT_LIST_ macros */
#
define
UNIV_MEM_DEBUG
/* detect memory leaks etc */
#
define
UNIV_MEM_DEBUG
/* detect memory leaks etc */
#
define
UNIV_IBUF_DEBUG
/* debug the insert buffer;
#
define
UNIV_IBUF_DEBUG
/* debug the insert buffer */
#
define
UNIV_IBUF_COUNT_DEBUG
/* debug the insert buffer;
this limits the database to IBUF_COUNT_N_SPACES and IBUF_COUNT_N_PAGES,
this limits the database to IBUF_COUNT_N_SPACES and IBUF_COUNT_N_PAGES,
and the insert buffer must be empty when the database is started */
and the insert buffer must be empty when the database is started */
#
define
UNIV_SYNC_DEBUG
/* debug mutex and latch
#
define
UNIV_SYNC_DEBUG
/* debug mutex and latch
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment