~ubuntu-branches/ubuntu/natty/mysql-5.1/natty-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 08:30:45 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20120222083045-2rd53r4bnyx7qus4
Tags: 5.1.61-0ubuntu0.11.04.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496

Show diffs side-by-side

added added

removed removed

Lines of Context:
201
201
        dyn_array_free(&(mtr->log));
202
202
}
203
203
 
204
 
/**************************************************************
205
 
Releases the latches stored in an mtr memo down to a savepoint.
206
 
NOTE! The mtr must not have made changes to buffer pages after the
207
 
savepoint, as these can be handled only by mtr_commit. */
208
 
 
209
 
void
210
 
mtr_rollback_to_savepoint(
211
 
/*======================*/
212
 
        mtr_t*  mtr,            /* in: mtr */
213
 
        ulint   savepoint)      /* in: savepoint */
214
 
{
215
 
        mtr_memo_slot_t* slot;
216
 
        dyn_array_t*    memo;
217
 
        ulint           offset;
218
 
 
219
 
        ut_ad(mtr);
220
 
        ut_ad(mtr->magic_n == MTR_MAGIC_N);
221
 
        ut_ad(mtr->state == MTR_ACTIVE);
222
 
 
223
 
        memo = &(mtr->memo);
224
 
 
225
 
        offset = dyn_array_get_data_size(memo);
226
 
        ut_ad(offset >= savepoint);
227
 
 
228
 
        while (offset > savepoint) {
229
 
                offset -= sizeof(mtr_memo_slot_t);
230
 
 
231
 
                slot = dyn_array_get_element(memo, offset);
232
 
 
233
 
                ut_ad(slot->type != MTR_MEMO_MODIFY);
234
 
                mtr_memo_slot_release(mtr, slot);
235
 
        }
236
 
}
237
 
 
238
204
/*******************************************************
239
205
Releases an object in the memo stack. */
240
206