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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
9ff083b3
Commit
9ff083b3
authored
Mar 23, 2009
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: hash_table_t: adaptive: Remove from UNIV_HOTBACKUP builds.
parent
cfff303b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
ha/ha0ha.c
ha/ha0ha.c
+10
-0
include/hash0hash.h
include/hash0hash.h
+2
-0
No files found.
ha/ha0ha.c
View file @
9ff083b3
...
...
@@ -152,6 +152,7 @@ ha_insert_for_fold_func(
while
(
prev_node
!=
NULL
)
{
if
(
prev_node
->
fold
==
fold
)
{
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
# ifndef UNIV_HOTBACKUP
if
(
table
->
adaptive
)
{
buf_block_t
*
prev_block
=
prev_node
->
block
;
ut_a
(
prev_block
->
frame
...
...
@@ -160,6 +161,7 @@ ha_insert_for_fold_func(
prev_block
->
n_pointers
--
;
block
->
n_pointers
++
;
}
# endif
/* !UNIV_HOTBACKUP */
prev_node
->
block
=
block
;
#endif
/* UNIV_AHI_DEBUG || UNIV_DEBUG */
...
...
@@ -187,10 +189,13 @@ ha_insert_for_fold_func(
ha_node_set_data
(
node
,
block
,
data
);
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
# ifndef UNIV_HOTBACKUP
if
(
table
->
adaptive
)
{
block
->
n_pointers
++
;
}
# endif
/* !UNIV_HOTBACKUP */
#endif
/* UNIV_AHI_DEBUG || UNIV_DEBUG */
node
->
fold
=
fold
;
node
->
next
=
NULL
;
...
...
@@ -224,12 +229,15 @@ ha_delete_hash_node(
ha_node_t
*
del_node
)
/* in: node to be deleted */
{
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
# ifndef UNIV_HOTBACKUP
if
(
table
->
adaptive
)
{
ut_a
(
del_node
->
block
->
frame
=
page_align
(
del_node
->
data
));
ut_a
(
del_node
->
block
->
n_pointers
>
0
);
del_node
->
block
->
n_pointers
--
;
}
# endif
/* !UNIV_HOTBACKUP */
#endif
/* UNIV_AHI_DEBUG || UNIV_DEBUG */
HASH_DELETE_AND_COMPACT
(
ha_node_t
,
next
,
table
,
del_node
);
}
...
...
@@ -281,11 +289,13 @@ ha_search_and_update_if_found_func(
if
(
node
)
{
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
# ifndef UNIV_HOTBACKUP
if
(
table
->
adaptive
)
{
ut_a
(
node
->
block
->
n_pointers
>
0
);
node
->
block
->
n_pointers
--
;
new_block
->
n_pointers
++
;
}
# endif
/* !UNIV_HOTBACKUP */
node
->
block
=
new_block
;
#endif
/* UNIV_AHI_DEBUG || UNIV_DEBUG */
...
...
include/hash0hash.h
View file @
9ff083b3
...
...
@@ -403,8 +403,10 @@ struct hash_cell_struct{
/* The hash table structure */
struct
hash_table_struct
{
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
# ifndef UNIV_HOTBACKUP
ibool
adaptive
;
/* TRUE if this is the hash table of the
adaptive hash index */
# endif
/* !UNIV_HOTBACKUP */
#endif
/* UNIV_AHI_DEBUG || UNIV_DEBUG */
ulint
n_cells
;
/* number of cells in the hash table */
hash_cell_t
*
array
;
/* pointer to cell array */
...
...
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