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
942cd7d4
Commit
942cd7d4
authored
Mar 23, 2007
by
istruewing@chilla.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#17332 - changing key_buffer_size on a running server
can crash under load After review fixes
parent
0282c199
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
164 deletions
+95
-164
mysys/mf_keycache.c
mysys/mf_keycache.c
+86
-133
storage/myisam/mi_preload.c
storage/myisam/mi_preload.c
+9
-31
No files found.
mysys/mf_keycache.c
View file @
942cd7d4
This diff is collapsed.
Click to expand it.
storage/myisam/mi_preload.c
View file @
942cd7d4
...
@@ -55,42 +55,20 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves)
...
@@ -55,42 +55,20 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves)
block_length
=
keyinfo
[
0
].
block_length
;
block_length
=
keyinfo
[
0
].
block_length
;
if
(
ignore_leaves
)
{
/* Check whether all indexes use the same block size */
/* Check whether all indexes use the same block size */
for
(
i
=
1
;
i
<
keys
;
i
++
)
for
(
i
=
1
;
i
<
keys
;
i
++
)
{
{
#if !defined(INGO_TEST_LOADIDX_OFF)
/* Allow non-IGNORE-LEAVES index loading even with different block sizes. */
if
(
ignore_leaves
&&
(
keyinfo
[
i
].
block_length
!=
block_length
))
DBUG_RETURN
(
my_errno
=
HA_ERR_NON_UNIQUE_BLOCK_SIZE
);
set_if_bigger
(
block_length
,
keyinfo
[
i
].
block_length
);
#else
if
(
keyinfo
[
i
].
block_length
!=
block_length
)
if
(
keyinfo
[
i
].
block_length
!=
block_length
)
DBUG_RETURN
(
my_errno
=
HA_ERR_NON_UNIQUE_BLOCK_SIZE
);
DBUG_RETURN
(
my_errno
=
HA_ERR_NON_UNIQUE_BLOCK_SIZE
);
#endif
}
}
#if !defined(INGO_TEST_LOADIDX_OFF)
/* Align non-IGNORE-LEAVES index loads. */
if
(
!
ignore_leaves
)
{
/* Round up to the next multiple of key_cache_block_size. */
length
=
((
info
->
preload_buff_size
+
share
->
key_cache
->
key_cache_block_size
-
1
)
/
share
->
key_cache
->
key_cache_block_size
*
share
->
key_cache
->
key_cache_block_size
);
/* Round down to the next multiple of key_cache_block_size. */
pos
=
(
share
->
base
.
keystart
/
share
->
key_cache
->
key_cache_block_size
*
share
->
key_cache
->
key_cache_block_size
);
}
}
else
else
{
block_length
=
share
->
key_cache
->
key_cache_block_size
;
length
=
info
->
preload_buff_size
/
block_length
*
block_length
;
set_if_bigger
(
length
,
block_length
);
}
#else
length
=
info
->
preload_buff_size
/
block_length
*
block_length
;
length
=
info
->
preload_buff_size
/
block_length
*
block_length
;
set_if_bigger
(
length
,
block_length
);
set_if_bigger
(
length
,
block_length
);
#endif
if
(
!
(
buff
=
(
uchar
*
)
my_malloc
(
length
,
MYF
(
MY_WME
))))
if
(
!
(
buff
=
(
uchar
*
)
my_malloc
(
length
,
MYF
(
MY_WME
))))
DBUG_RETURN
(
my_errno
=
HA_ERR_OUT_OF_MEM
);
DBUG_RETURN
(
my_errno
=
HA_ERR_OUT_OF_MEM
);
...
...
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