|
1 | 1 | /***************************************************************************** |
2 | 2 |
|
3 | | -Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved. |
| 3 | +Copyright (c) 1996, 2011, Oracle and/or its affiliates. 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 |
@@ -204,17 +204,51 @@ trx_undo_add_page( |
204 | 204 | mtr_t* mtr); /*!< in: mtr which does not have a latch to any |
205 | 205 | undo log page; the caller must have reserved |
206 | 206 | the rollback segment mutex */ |
| 207 | +/********************************************************************//** |
| 208 | +Frees the last undo log page. |
| 209 | +The caller must hold the rollback segment mutex. */ |
| 210 | +UNIV_INTERN |
| 211 | +void |
| 212 | +trx_undo_free_last_page_func( |
| 213 | +/*==========================*/ |
| 214 | +#ifdef UNIV_DEBUG |
| 215 | + const trx_t* trx, /*!< in: transaction */ |
| 216 | +#endif /* UNIV_DEBUG */ |
| 217 | + trx_undo_t* undo, /*!< in/out: undo log memory copy */ |
| 218 | + mtr_t* mtr) /*!< in/out: mini-transaction which does not |
| 219 | + have a latch to any undo log page or which |
| 220 | + has allocated the undo log page */ |
| 221 | + __attribute__((nonnull)); |
| 222 | +#ifdef UNIV_DEBUG |
| 223 | +# define trx_undo_free_last_page(trx,undo,mtr) \ |
| 224 | + trx_undo_free_last_page_func(trx,undo,mtr) |
| 225 | +#else /* UNIV_DEBUG */ |
| 226 | +# define trx_undo_free_last_page(trx,undo,mtr) \ |
| 227 | + trx_undo_free_last_page_func(undo,mtr) |
| 228 | +#endif /* UNIV_DEBUG */ |
| 229 | + |
207 | 230 | /***********************************************************************//** |
208 | 231 | Truncates an undo log from the end. This function is used during a rollback |
209 | 232 | to free space from an undo log. */ |
210 | 233 | UNIV_INTERN |
211 | 234 | void |
212 | | -trx_undo_truncate_end( |
213 | | -/*==================*/ |
214 | | - trx_t* trx, /*!< in: transaction whose undo log it is */ |
215 | | - trx_undo_t* undo, /*!< in: undo log */ |
216 | | - undo_no_t limit); /*!< in: all undo records with undo number |
| 235 | +trx_undo_truncate_end_func( |
| 236 | +/*=======================*/ |
| 237 | +#ifdef UNIV_DEBUG |
| 238 | + const trx_t* trx, /*!< in: transaction whose undo log it is */ |
| 239 | +#endif /* UNIV_DEBUG */ |
| 240 | + trx_undo_t* undo, /*!< in/out: undo log */ |
| 241 | + undo_no_t limit) /*!< in: all undo records with undo number |
217 | 242 | >= this value should be truncated */ |
| 243 | + __attribute__((nonnull)); |
| 244 | +#ifdef UNIV_DEBUG |
| 245 | +# define trx_undo_truncate_end(trx,undo,limit) \ |
| 246 | + trx_undo_truncate_end_func(trx,undo,limit) |
| 247 | +#else /* UNIV_DEBUG */ |
| 248 | +# define trx_undo_truncate_end(trx,undo,limit) \ |
| 249 | + trx_undo_truncate_end_func(undo,limit) |
| 250 | +#endif /* UNIV_DEBUG */ |
| 251 | + |
218 | 252 | /***********************************************************************//** |
219 | 253 | Truncates an undo log from the start. This function is used during a purge |
220 | 254 | operation. */ |
|
0 commit comments