~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/ha_data.h

  • Committer: Brian Aker
  • Date: 2010-10-20 20:26:18 UTC
  • mfrom: (1859.2.13 refactor)
  • Revision ID: brian@tangent.org-20101020202618-9222n39lm329urv5
Merge for Brian 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 
 *
4
 
 *  Copyright (C) 2011 Brian Aker
5
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
6
 
 *
7
 
 *  This program is free software; you can redistribute it and/or modify
8
 
 *  it under the terms of the GNU General Public License as published by
9
 
 *  the Free Software Foundation; version 2 of the License.
10
 
 *
11
 
 *  This program is distributed in the hope that it will be useful,
12
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
 *  GNU General Public License for more details.
15
 
 *
16
 
 *  You should have received a copy of the GNU General Public License
17
 
 *  along with this program; if not, write to the Free Software
18
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 
 */
20
 
 
21
 
#ifndef DRIZZLED_HA_DATA_H
22
 
#define DRIZZLED_HA_DATA_H
23
 
 
24
 
namespace drizzled
25
 
{
26
 
 
27
 
/**
28
 
  Storage engine specific thread local data.
29
 
*/
30
 
struct Ha_data
31
 
{
32
 
  /**
33
 
    Storage engine specific thread local data.
34
 
    Lifetime: one user connection.
35
 
  */
36
 
  void *ha_ptr;
37
 
  /**
38
 
   * Resource contexts for both the "statement" and "normal"
39
 
   * transactions.
40
 
   *
41
 
   * Resource context at index 0:
42
 
   *
43
 
   * Life time: one statement within a transaction. If @@autocommit is
44
 
   * on, also represents the entire transaction.
45
 
   *
46
 
   * Resource context at index 1:
47
 
   *
48
 
   * Life time: one transaction within a connection. 
49
 
   *
50
 
   * @note
51
 
   *
52
 
   * If the storage engine does not participate in a transaction, 
53
 
   * there will not be a resource context.
54
 
   */
55
 
  drizzled::ResourceContext resource_context[2];
56
 
 
57
 
  Ha_data() :
58
 
    ha_ptr(NULL)
59
 
  {}
60
 
};
61
 
 
62
 
 
63
 
} /* namespace drizzled */
64
 
 
65
 
#endif /* DRIZZLED_HA_DATA_H */