~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/mtr/mtr0mtr.c

  • Committer: Eric Day
  • Date: 2009-03-24 04:59:05 UTC
  • mfrom: (962 drizzle)
  • mto: (968.1.1 lib-merge)
  • mto: This revision was merged to the branch mainline in revision 969.
  • Revision ID: eday@oddments.org-20090324045905-2ptqhz3ves0aa5ed
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 
 
3
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
 
4
 
 
5
This program is free software; you can redistribute it and/or modify it under
 
6
the terms of the GNU General Public License as published by the Free Software
 
7
Foundation; version 2 of the License.
 
8
 
 
9
This program is distributed in the hope that it will be useful, but WITHOUT
 
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 
12
 
 
13
You should have received a copy of the GNU General Public License along with
 
14
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 
15
Place, Suite 330, Boston, MA 02111-1307 USA
 
16
 
 
17
*****************************************************************************/
 
18
 
1
19
/******************************************************
2
20
Mini-transaction buffer
3
21
 
4
 
(c) 1995 Innobase Oy
5
 
 
6
22
Created 11/26/1995 Heikki Tuuri
7
23
*******************************************************/
8
24
 
158
174
        ut_ad(mtr);
159
175
        ut_ad(mtr->magic_n == MTR_MAGIC_N);
160
176
        ut_ad(mtr->state == MTR_ACTIVE);
161
 
#ifdef UNIV_DEBUG
162
 
        mtr->state = MTR_COMMITTING;
163
 
#endif
 
177
        ut_d(mtr->state = MTR_COMMITTING);
 
178
 
164
179
        write_log = mtr->modifications && mtr->n_log_recs;
165
180
 
166
181
        if (write_log) {
181
196
                log_release();
182
197
        }
183
198
 
184
 
#ifdef UNIV_DEBUG
185
 
        mtr->state = MTR_COMMITTED;
186
 
#endif
 
199
        ut_d(mtr->state = MTR_COMMITTED);
187
200
        dyn_array_free(&(mtr->memo));
188
201
        dyn_array_free(&(mtr->log));
189
202
}
312
325
        const byte*     ptr,    /* in: pointer to buffer frame */
313
326
        ulint           type)   /* in: type of object */
314
327
{
315
 
        ibool   ret;
316
 
 
317
 
        buf_pool_mutex_enter();
318
 
        ret = mtr_memo_contains(mtr, buf_block_align(ptr), type);
319
 
        buf_pool_mutex_exit();
320
 
        return(ret);
 
328
        return(mtr_memo_contains(mtr, buf_block_align(ptr), type));
321
329
}
322
330
 
323
331
/*************************************************************