~percona-core/percona-server/5.5

« back to all changes in this revision

Viewing changes to Percona-Server/storage/innobase/trx/trx0trx.c

  • Committer: Laurynas Biveinis
  • Date: 2013-09-06 13:24:59 UTC
  • mfrom: (558.8.3 5.5)
  • Revision ID: laurynas.biveinis@percona.com-20130906132459-jfaquw8dbwluzbsl
MergeĀ lp:~akopytov/percona-server/ahi-fixes-5.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
386
386
}
387
387
 
388
388
/********************************************************************//**
389
 
Releases the search latch if trx has reserved it. */
390
 
UNIV_INTERN
391
 
void
392
 
trx_search_latch_release_if_reserved(
393
 
/*=================================*/
394
 
        trx_t*     trx) /*!< in: transaction */
395
 
{
396
 
        ulint   i;
397
 
 
398
 
        if (trx->has_search_latch) {
399
 
                for (i = 0; i < btr_search_index_num; i++) {
400
 
                        if (trx->has_search_latch & ((ulint)1 << i)) {
401
 
                                rw_lock_s_unlock(btr_search_latch_part[i]);
402
 
                        }
403
 
                }
404
 
 
405
 
                trx->has_search_latch = FALSE;
406
 
        }
407
 
}
408
 
 
409
 
/********************************************************************//**
410
389
Frees a transaction object. */
411
390
UNIV_INTERN
412
391
void
468
447
        ut_a(UT_LIST_GET_LEN(trx->wait_thrs) == 0);
469
448
 
470
449
        ut_a(!trx->has_search_latch);
 
450
#ifdef UNIV_SYNC_DEBUG
 
451
        ut_ad(!btr_search_own_any());
 
452
#endif
471
453
 
472
454
        ut_a(trx->dict_operation_lock_mode == 0);
473
455
 
527
509
        ut_a(UT_LIST_GET_LEN(trx->wait_thrs) == 0);
528
510
 
529
511
        ut_a(!trx->has_search_latch);
 
512
#ifdef UNIV_SYNC_DEBUG
 
513
        ut_ad(!btr_search_own_any());
 
514
#endif
530
515
 
531
516
        ut_a(trx->dict_operation_lock_mode == 0);
532
517