Comment 1 for bug 791030

Next problematic place is:

--------------------------------------------------
                        hash index semaphore! */

 #ifndef UNIV_SEARCH_DEBUG
- if (!trx->has_search_latch) {
- rw_lock_s_lock(&btr_search_latch);
- trx->has_search_latch = TRUE;
+ if (!(trx->has_search_latch
+ & ((ulint)1 << (index->id % btr_search_index_num)))) {
+ rw_lock_s_lock(btr_search_get_latch(index->id));
+ trx->has_search_latch |=
+ (ulint)1 << (index->id % btr_search_index_num);
                        }
 #endif
                        switch (row_sel_try_search_shortcut_for_mysql(
--------------------------------------------------

We should decide explicit latch order between btr_search_latch_part[n], and rewrite patch to this function.
It is more possibly to cause hangup than the reported before.