summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <aivanov@mysql.com>2006-04-01 01:54:15 +0400
committerunknown <aivanov@mysql.com>2006-04-01 01:54:15 +0400
commitf6ffb77cb4dce0a337931fb7bdd08352eee4d9be (patch)
tree0fad636355da0a66360a4141a35c2898d3bae1b2 /innobase
parente40b76c970b1b49cf35f5ccb29395eb454069238 (diff)
downloadmariadb-git-f6ffb77cb4dce0a337931fb7bdd08352eee4d9be.tar.gz
Applied innodb-5.0-ss398 snapshot.
Fixed BUG#15650: DELETE with LEFT JOIN crashes server with innodb_locks_unsafe_for_binlog. Fixed compilation problem with non-C99 compilers in btr0sea.c innobase/btr/btr0sea.c: Applied innodb-5.0-ss398 snapshot. Fix compilation problem with non-C99 compilers. sql/ha_innodb.cc: Applied innodb-5.0-ss398 snapshot. Remove assertion ut_error which crashes the mysqld server if it prints a warning about the adaptive latch.
Diffstat (limited to 'innobase')
-rw-r--r--innobase/btr/btr0sea.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/innobase/btr/btr0sea.c b/innobase/btr/btr0sea.c
index 631b33acbf2..ed746bcf12c 100644
--- a/innobase/btr/btr0sea.c
+++ b/innobase/btr/btr0sea.c
@@ -59,9 +59,6 @@ before hash index building is started */
#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
has a hash index with different parameters, the old hash index is removed.
@@ -1607,6 +1604,11 @@ btr_search_validate(void)
mem_heap_t* heap = NULL;
ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
+
+ /* How many cells to check before temporarily releasing
+ btr_search_latch. */
+ ulint chunk_size = 10000;
+
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
rw_lock_x_lock(&btr_search_latch);
@@ -1616,7 +1618,7 @@ btr_search_validate(void)
for (i = 0; i < cell_count; i++) {
/* We release btr_search_latch every once in a while to
give other queries a chance to run. */
- if ((i != 0) && ((i % BTR_CHUNK_SIZE) == 0)) {
+ if ((i != 0) && ((i % chunk_size) == 0)) {
rw_lock_x_unlock(&btr_search_latch);
os_thread_yield();
rw_lock_x_lock(&btr_search_latch);
@@ -1675,8 +1677,8 @@ btr_search_validate(void)
}
}
- for (i = 0; i < cell_count; i += BTR_CHUNK_SIZE) {
- ulint end_index = ut_min(i + BTR_CHUNK_SIZE - 1, cell_count - 1);
+ for (i = 0; i < cell_count; i += chunk_size) {
+ ulint end_index = ut_min(i + chunk_size - 1, cell_count - 1);
/* We release btr_search_latch every once in a while to
give other queries a chance to run. */