~ubuntu-branches/ubuntu/vivid/drizzle/vivid-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Tobias Frost
  • Date: 2013-08-22 20:18:31 UTC
  • mto: (20.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: package-import@ubuntu.com-20130822201831-gn3ozsh7o7wmc5tk
Tags: upstream-7.2.3
ImportĀ upstreamĀ versionĀ 7.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (C) 1996, 2011, Innobase Oy. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
69
69
mutex. */
70
70
UNIV_INTERN
71
71
void
72
 
trx_purge_sys_create(void);
73
 
/*======================*/
 
72
trx_purge_sys_create(
 
73
/*=================*/
 
74
        ib_bh_t*        ib_bh); /*!< in/own: UNDO log min binary heap*/
74
75
/********************************************************************//**
75
76
Frees the global purge system control structure. */
76
77
UNIV_INTERN
129
130
        ulint           state;          /*!< Purge system state */
130
131
        sess_t*         sess;           /*!< System session running the purge
131
132
                                        query */
132
 
        trx_t*          trx;            /*!< System transaction running the purge
 
133
        trx_t*          trx;            /*!< System transaction running the
 
134
                                        purge
133
135
                                        query: this trx is not in the trx list
134
136
                                        of the trx system and it never ends */
135
137
        que_t*          query;          /*!< The query graph which will do the
136
138
                                        parallelized purge operation */
137
 
        rw_lock_t       latch;          /*!< The latch protecting the purge view.
138
 
                                        A purge operation must acquire an
139
 
                                        x-latch here for the instant at which
 
139
        rw_lock_t       latch;          /*!< The latch protecting the purge
 
140
                                        view.  A purge operation must acquire
 
141
                                        an x-latch here for the instant at which
140
142
                                        it changes the purge view: an undo
141
143
                                        log operation can prevent this by
142
144
                                        obtaining an s-latch here. */
143
145
        read_view_t*    view;           /*!< The purge will not remove undo logs
144
146
                                        which are >= this view (purge view) */
145
 
        mutex_t         mutex;          /*!< Mutex protecting the fields below */
146
147
        ulint           n_pages_handled;/*!< Approximate number of undo log
147
148
                                        pages processed in purge */
148
149
        ulint           handle_limit;   /*!< Target of how many pages to get
180
181
        mem_heap_t*     heap;           /*!< Temporary storage used during a
181
182
                                        purge: can be emptied after purge
182
183
                                        completes */
 
184
        /*-----------------------------*/
 
185
        ib_bh_t*        ib_bh;          /*!< Binary min-heap, ordered on
 
186
                                        rseg_queue_t::trx_no. It is protected
 
187
                                        by the bh_mutex */
 
188
        mutex_t         bh_mutex;       /*!< Mutex protecting ib_bh */
183
189
};
184
190
 
185
191
#define TRX_PURGE_ON            1       /* purge operation is running */