~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/trx0trx.h

  • Committer: Lee Bieber
  • Date: 2010-12-03 01:16:19 UTC
  • mfrom: (1819.9.81 update-innobase)
  • Revision ID: kalebral@gmail.com-20101203011619-n6v584rijwdet05b
Merge Stewart - update Innobase plugin based on InnoDB 1.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
408
408
is estimated as the number of altered rows + the number of locked rows.
409
409
@param t        transaction
410
410
@return         transaction weight */
411
 
#define TRX_WEIGHT(t)   \
412
 
        ut_dulint_add((t)->undo_no, UT_LIST_GET_LEN((t)->trx_locks))
 
411
#define TRX_WEIGHT(t)   ((t)->undo_no + UT_LIST_GET_LEN((t)->trx_locks))
413
412
 
414
413
/*******************************************************************//**
415
414
Compares the "weight" (or size) of two transactions. Transactions that
416
415
have edited non-transactional tables are considered heavier than ones
417
416
that have not.
418
 
@return <0, 0 or >0; similar to strcmp(3) */
 
417
@return TRUE if weight(a) >= weight(b) */
419
418
UNIV_INTERN
420
 
int
421
 
trx_weight_cmp(
422
 
/*===========*/
 
419
ibool
 
420
trx_weight_ge(
 
421
/*==========*/
423
422
        const trx_t*    a,      /*!< in: the first transaction to be compared */
424
423
        const trx_t*    b);     /*!< in: the second transaction to be compared */
425
424
 
426
 
/*******************************************************************//**
427
 
Retrieves transacion's id, represented as unsigned long long.
428
 
@return transaction's id */
429
 
UNIV_INLINE
430
 
ullint
431
 
trx_get_id(
432
 
/*=======*/
433
 
        const trx_t*    trx);   /*!< in: transaction */
434
 
 
435
425
/* Maximum length of a string that can be returned by
436
426
trx_get_que_state_str(). */
437
427
#define TRX_QUE_STATE_STR_MAX_LEN       12 /* "ROLLING BACK" */
555
545
                                        max trx id when the transaction is
556
546
                                        moved to COMMITTED_IN_MEMORY state */
557
547
        ib_uint64_t     commit_lsn;     /*!< lsn at the time of the commit */
558
 
        trx_id_t        table_id;       /*!< Table to drop iff dict_operation
559
 
                                        is TRUE, or ut_dulint_zero. */
 
548
        table_id_t      table_id;       /*!< Table to drop iff dict_operation
 
549
                                        is TRUE, or 0. */
560
550
        /*------------------------------*/
561
551
        void*           mysql_thd;      /*!< MySQL thread handle corresponding
562
552
                                        to this trx, or NULL */