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
6180fa31
Commit
6180fa31
authored
Jun 30, 2010
by
Jimmy Yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug #54311 Crash on CHECK PARTITION after concurrent LOAD DATA
and adaptive_hash_index=OFF
rb://389
approved by Marko
parent
75a5aaf2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
6 deletions
+29
-6
storage/innobase/btr/btr0sea.c
storage/innobase/btr/btr0sea.c
+10
-1
storage/innobase/ha/ha0ha.c
storage/innobase/ha/ha0ha.c
+11
-4
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+1
-0
storage/innobase/include/btr0sea.h
storage/innobase/include/btr0sea.h
+7
-1
No files found.
storage/innobase/btr/btr0sea.c
View file @
6180fa31
...
...
@@ -46,6 +46,7 @@ Created 2/17/1996 Heikki Tuuri
/** Flag: has the search system been enabled?
Protected by btr_search_latch and btr_search_enabled_mutex. */
UNIV_INTERN
char
btr_search_enabled
=
TRUE
;
UNIV_INTERN
ibool
btr_search_fully_disabled
=
FALSE
;
/** Mutex protecting btr_search_enabled */
static
mutex_t
btr_search_enabled_mutex
;
...
...
@@ -213,12 +214,19 @@ btr_search_disable(void)
mutex_enter
(
&
btr_search_enabled_mutex
);
rw_lock_x_lock
(
&
btr_search_latch
);
/* Disable access to hash index, also tell ha_insert_for_fold()
stop adding new nodes to hash index, but still allow updating
existing nodes */
btr_search_enabled
=
FALSE
;
/* Clear all block->is_hashed flags and remove all entries
from btr_search_sys->hash_index. */
buf_pool_drop_hash_index
();
/* hash index has been cleaned up, disallow any operation to
the hash index */
btr_search_fully_disabled
=
TRUE
;
/* btr_search_enabled_mutex should guarantee this. */
ut_ad
(
!
btr_search_enabled
);
...
...
@@ -237,6 +245,7 @@ btr_search_enable(void)
rw_lock_x_lock
(
&
btr_search_latch
);
btr_search_enabled
=
TRUE
;
btr_search_fully_disabled
=
FALSE
;
rw_lock_x_unlock
(
&
btr_search_latch
);
mutex_exit
(
&
btr_search_enabled_mutex
);
...
...
@@ -1375,7 +1384,7 @@ btr_search_build_page_hash_index(
rw_lock_x_lock
(
&
btr_search_latch
);
if
(
UNIV_UNLIKELY
(
!
btr_search_en
abled
))
{
if
(
UNIV_UNLIKELY
(
btr_search_fully_dis
abled
))
{
goto
exit_func
;
}
...
...
storage/innobase/ha/ha0ha.c
View file @
6180fa31
...
...
@@ -31,9 +31,7 @@ Created 8/22/1994 Heikki Tuuri
#ifdef UNIV_DEBUG
# include "buf0buf.h"
#endif
/* UNIV_DEBUG */
#ifdef UNIV_SYNC_DEBUG
# include "btr0sea.h"
#endif
/* UNIV_SYNC_DEBUG */
#include "btr0sea.h"
#include "page0page.h"
/*************************************************************//**
...
...
@@ -127,7 +125,8 @@ ha_clear(
/*************************************************************//**
Inserts an entry into a hash table. If an entry with the same fold number
is found, its node is updated to point to the new data, and no new node
is inserted.
is inserted. If btr_search_enabled is set to FALSE, we will only allow
updating existing nodes, but no new node is allowed to be added.
@return TRUE if succeed, FALSE if no more memory could be allocated */
UNIV_INTERN
ibool
...
...
@@ -174,6 +173,7 @@ ha_insert_for_fold_func(
prev_block
->
n_pointers
--
;
block
->
n_pointers
++
;
}
ut_ad
(
!
btr_search_fully_disabled
);
# endif
/* !UNIV_HOTBACKUP */
prev_node
->
block
=
block
;
...
...
@@ -186,6 +186,13 @@ ha_insert_for_fold_func(
prev_node
=
prev_node
->
next
;
}
/* We are in the process of disabling hash index, do not add
new chain node */
if
(
!
btr_search_enabled
)
{
ut_ad
(
!
btr_search_fully_disabled
);
return
(
TRUE
);
}
/* We have to allocate a new chain node */
node
=
mem_heap_alloc
(
hash_get_heap
(
table
,
fold
),
sizeof
(
ha_node_t
));
...
...
storage/innobase/handler/ha_innodb.cc
View file @
6180fa31
...
...
@@ -2451,6 +2451,7 @@ innobase_change_buffering_inited_ok:
/* Get the current high water mark format. */
innobase_file_format_max
=
(
char
*
)
trx_sys_file_format_max_get
();
btr_search_fully_disabled
=
(
!
btr_search_enabled
);
DBUG_RETURN
(
FALSE
);
error:
DBUG_RETURN
(
TRUE
);
...
...
storage/innobase/include/btr0sea.h
View file @
6180fa31
...
...
@@ -190,7 +190,13 @@ btr_search_validate(void);
/** Flag: has the search system been enabled?
Protected by btr_search_latch and btr_search_enabled_mutex. */
extern
char
btr_search_enabled
;
extern
char
btr_search_enabled
;
/** Flag: whether the search system has completed its disabling process,
It is set to TRUE right after buf_pool_drop_hash_index() in
btr_search_disable(), indicating hash index entries are cleaned up.
Protected by btr_search_latch and btr_search_enabled_mutex. */
extern
ibool
btr_search_fully_disabled
;
/** The search info struct in an index */
struct
btr_search_struct
{
...
...
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