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
682304af
Commit
682304af
authored
Mar 30, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge
storage/ndb/tools/Makefile.am: Auto merged
parents
a318cc7c
e40b76c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
storage/innobase/btr/btr0sea.c
storage/innobase/btr/btr0sea.c
+9
-10
No files found.
storage/innobase/btr/btr0sea.c
View file @
682304af
...
@@ -59,6 +59,9 @@ before hash index building is started */
...
@@ -59,6 +59,9 @@ before hash index building is started */
#define BTR_SEARCH_BUILD_LIMIT 100
#define BTR_SEARCH_BUILD_LIMIT 100
/* How many cells to check before temporarily releasing btr_search_latch */
#define BTR_CHUNK_SIZE 10000
/************************************************************************
/************************************************************************
Builds a hash index on a page with the given parameters. If the page already
Builds a hash index on a page with the given parameters. If the page already
has a hash index with different parameters, the old hash index is removed.
has a hash index with different parameters, the old hash index is removed.
...
@@ -1604,25 +1607,21 @@ btr_search_validate(void)
...
@@ -1604,25 +1607,21 @@ btr_search_validate(void)
mem_heap_t
*
heap
=
NULL
;
mem_heap_t
*
heap
=
NULL
;
ulint
offsets_
[
REC_OFFS_NORMAL_SIZE
];
ulint
offsets_
[
REC_OFFS_NORMAL_SIZE
];
ulint
*
offsets
=
offsets_
;
ulint
*
offsets
=
offsets_
;
/* How many cells to check before temporarily releasing
btr_search_latch. */
ulint
chunk_size
=
10000
;
*
offsets_
=
(
sizeof
offsets_
)
/
sizeof
*
offsets_
;
*
offsets_
=
(
sizeof
offsets_
)
/
sizeof
*
offsets_
;
rw_lock_x_lock
(
&
btr_search_latch
);
rw_lock_x_lock
(
&
btr_search_latch
);
cell_count
=
hash_get_n_cells
(
btr_search_sys
->
hash_index
);
cell_count
=
hash_get_n_cells
(
btr_search_sys
->
hash_index
);
for
(
i
=
0
;
i
<
cell_count
;
i
++
)
{
for
(
i
=
0
;
i
<
cell_count
;
i
++
)
{
/* We release btr_search_latch every once in a while to
/* We release btr_search_latch every once in a while to
give other queries a chance to run. */
give other queries a chance to run. */
if
((
i
!=
0
)
&&
((
i
%
chunk_size
)
==
0
))
{
if
((
i
!=
0
)
&&
((
i
%
BTR_CHUNK_SIZE
)
==
0
))
{
rw_lock_x_unlock
(
&
btr_search_latch
);
rw_lock_x_unlock
(
&
btr_search_latch
);
os_thread_yield
();
os_thread_yield
();
rw_lock_x_lock
(
&
btr_search_latch
);
rw_lock_x_lock
(
&
btr_search_latch
);
}
}
node
=
hash_get_nth_cell
(
btr_search_sys
->
hash_index
,
i
)
->
node
;
node
=
hash_get_nth_cell
(
btr_search_sys
->
hash_index
,
i
)
->
node
;
while
(
node
!=
NULL
)
{
while
(
node
!=
NULL
)
{
...
@@ -1676,9 +1675,9 @@ btr_search_validate(void)
...
@@ -1676,9 +1675,9 @@ btr_search_validate(void)
}
}
}
}
for
(
i
=
0
;
i
<
cell_count
;
i
+=
chunk_size
)
{
for
(
i
=
0
;
i
<
cell_count
;
i
+=
BTR_CHUNK_SIZE
)
{
ulint
end_index
=
ut_min
(
i
+
chunk_size
-
1
,
cell_count
-
1
);
ulint
end_index
=
ut_min
(
i
+
BTR_CHUNK_SIZE
-
1
,
cell_count
-
1
);
/* We release btr_search_latch every once in a while to
/* We release btr_search_latch every once in a while to
give other queries a chance to run. */
give other queries a chance to run. */
if
(
i
!=
0
)
{
if
(
i
!=
0
)
{
...
...
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