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

« back to all changes in this revision

Viewing changes to storage/innodb_plugin/trx/trx0sys.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include "trx0rseg.h"
38
38
#include "trx0undo.h"
39
39
#include "srv0srv.h"
 
40
#include "srv0start.h"
40
41
#include "trx0purge.h"
41
42
#include "log0log.h"
42
43
#include "os0file.h"
241
242
{
242
243
        buf_block_t*    block;
243
244
        buf_block_t*    block2;
 
245
#ifdef UNIV_SYNC_DEBUG
244
246
        buf_block_t*    new_block;
 
247
#endif /* UNIV_SYNC_DEBUG */
245
248
        byte*   doublewrite;
246
249
        byte*   fseg_header;
247
250
        ulint   page_no;
344
347
                        the page position in the tablespace, then the page
345
348
                        has not been written to in doublewrite. */
346
349
 
347
 
                        new_block = buf_page_get(TRX_SYS_SPACE, 0, page_no,
348
 
                                                 RW_X_LATCH, &mtr);
 
350
#ifdef UNIV_SYNC_DEBUG
 
351
                        new_block =
 
352
#endif /* UNIV_SYNC_DEBUG */
 
353
                        buf_page_get(TRX_SYS_SPACE, 0, page_no,
 
354
                                     RW_X_LATCH, &mtr);
349
355
                        buf_block_dbg_add_level(new_block,
350
356
                                                SYNC_NO_ORDER_CHECK);
351
357
 
1543
1549
trx_sys_close(void)
1544
1550
/*===============*/
1545
1551
{
 
1552
        trx_t*          trx;
1546
1553
        trx_rseg_t*     rseg;
1547
1554
        read_view_t*    view;
1548
1555
 
1549
1556
        ut_ad(trx_sys != NULL);
 
1557
        ut_ad(srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS);
1550
1558
 
1551
1559
        /* Check that all read views are closed except read view owned
1552
1560
        by a purge. */
1578
1586
        mem_free(trx_doublewrite);
1579
1587
        trx_doublewrite = NULL;
1580
1588
 
 
1589
        /* Only prepared transactions may be left in the system. Free them. */
 
1590
        ut_a(UT_LIST_GET_LEN(trx_sys->trx_list) == trx_n_prepared);
 
1591
 
 
1592
        while ((trx = UT_LIST_GET_FIRST(trx_sys->trx_list)) != NULL) {
 
1593
                trx_free_prepared(trx);
 
1594
        }
 
1595
 
1581
1596
        /* There can't be any active transactions. */
1582
1597
        rseg = UT_LIST_GET_FIRST(trx_sys->rseg_list);
1583
1598