txn.src
Upload User: tsgydb
Upload Date: 2007-04-14
Package Size: 10674k
Code Size: 3k
Category:

MySQL

Development Platform:

Visual C++

  1. /*-
  2.  * See the file LICENSE for redistribution information.
  3.  *
  4.  * Copyright (c) 1996, 1997, 1998, 1999, 2000
  5.  * Sleepycat Software.  All rights reserved.
  6.  *
  7.  * $Id: txn.src,v 11.10 2001/01/02 00:58:33 margo Exp $
  8.  */
  9. PREFIX txn
  10. INCLUDE #include "db_config.h"
  11. INCLUDE
  12. INCLUDE #ifndef NO_SYSTEM_INCLUDES
  13. INCLUDE #include <sys/types.h>
  14. INCLUDE
  15. INCLUDE #include <ctype.h>
  16. INCLUDE #include <errno.h>
  17. INCLUDE #include <string.h>
  18. INCLUDE #endif
  19. INCLUDE
  20. INCLUDE #include "db_int.h"
  21. INCLUDE #include "db_page.h"
  22. INCLUDE #include "db_dispatch.h"
  23. INCLUDE #include "db_am.h"
  24. INCLUDE #include "txn.h"
  25. INCLUDE
  26. /*
  27.  * DEPRECATED in 3.1 to add timestamps.
  28.  */
  29. DEPRECATED old_regop 6
  30. ARG opcode u_int32_t lu
  31. END
  32. /*
  33.  * This is the standard log operation for commit.
  34.  * Note that we are using an int32_t for the timestamp.  This means that
  35.  * in 2039 we will need to deprecate this log record and create one that
  36.  * either changes the Epoch or has a 64-bit offset.
  37.  */
  38. BEGIN regop 10
  39. ARG opcode u_int32_t lu
  40. ARG timestamp int32_t ld
  41. END
  42. DEPRECATED old_ckp 7
  43. POINTER ckp_lsn DB_LSN * lu
  44. POINTER last_ckp DB_LSN * lu
  45. END
  46. /*
  47.  * This is the checkpoint record.  It contains the lsn that the checkpoint
  48.  * guarantees and a pointer to the last checkpoint so we can walk backwards
  49.  * by checkpoint.
  50.  *
  51.  * ckp_lsn:
  52.  * The lsn in the log of the most recent point at which all begun
  53.  * transactions have been aborted.  This is the point for which
  54.  * the checkpoint is relevant.
  55.  * last_ckp:
  56.  * The previous checkpoint.
  57.  * timestamp:
  58.  * See comment in commit about timestamps.
  59.  */
  60. BEGIN ckp 11
  61. POINTER ckp_lsn DB_LSN * lu
  62. POINTER last_ckp DB_LSN * lu
  63. ARG timestamp int32_t ld
  64. END
  65. /*
  66.  * This is the standard log operation for prepare (since right now
  67.  * we only use prepare in an XA environment).
  68.  */
  69. DEPRECATED xa_regop_old 8
  70. ARG opcode u_int32_t lu
  71. DBT xid DBT s
  72. ARG formatID int32_t ld
  73. ARG gtrid u_int32_t u
  74. ARG bqual u_int32_t u
  75. END
  76. /*
  77.  * This is the standard log operation for prepare (since right now
  78.  * we only use prepare in an XA environment).
  79.  */
  80. BEGIN xa_regop 13
  81. ARG opcode u_int32_t lu
  82. DBT xid DBT s
  83. ARG formatID int32_t ld
  84. ARG gtrid u_int32_t u
  85. ARG bqual u_int32_t u
  86. POINTER begin_lsn DB_LSN * lu
  87. END
  88. /*
  89.  * This is the log operation for a child commit.
  90.  */
  91. DEPRECATED child_old 9
  92. ARG opcode u_int32_t lu
  93. ARG parent u_int32_t lx
  94. END
  95. /*
  96.  * This is the (new) log operation for a child commit.  It is
  97.  * logged as a record in the PARENT.  The child field contains
  98.  * the transaction ID of the child committing and the c_lsn is
  99.  * the last LSN of the child's log trail.
  100.  */
  101. BEGIN child 12
  102. ARG child u_int32_t lx
  103. POINTER c_lsn DB_LSN * lu
  104. END