diff options
author | unknown <aivanov@mysql.com> | 2006-04-01 01:54:15 +0400 |
---|---|---|
committer | unknown <aivanov@mysql.com> | 2006-04-01 01:54:15 +0400 |
commit | f6ffb77cb4dce0a337931fb7bdd08352eee4d9be (patch) | |
tree | 0fad636355da0a66360a4141a35c2898d3bae1b2 | |
parent | e40b76c970b1b49cf35f5ccb29395eb454069238 (diff) | |
download | mariadb-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.
-rw-r--r-- | innobase/btr/btr0sea.c | 14 | ||||
-rw-r--r-- | sql/ha_innodb.cc | 10 |
2 files changed, 16 insertions, 8 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. */ diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 4b25f639a8f..41f017e6405 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -989,7 +989,6 @@ innobase_query_caching_of_table_permitted( mutex_enter_noninline(&kernel_mutex); trx_print(stderr, trx, 1024); mutex_exit_noninline(&kernel_mutex); - ut_error; } innobase_release_stat_resources(trx); @@ -3832,7 +3831,14 @@ ha_innobase::unlock_row(void) mem_analyze_corruption((byte *) prebuilt->trx); ut_error; } - + + /* Consistent read does not take any locks, thus there is + nothing to unlock. */ + + if (prebuilt->select_lock_type == LOCK_NONE) { + DBUG_VOID_RETURN; + } + if (srv_locks_unsafe_for_binlog) { row_unlock_for_mysql(prebuilt, FALSE); } |