~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/tmp_table_param.h

This patch completes the first step in the splitting of
the XA resource manager API from the storage engine API,
as outlined in the specification here:

http://drizzle.org/wiki/XaStorageEngine

* Splits plugin::StorageEngine into a base StorageEngine
  class and two derived classes, TransactionalStorageEngine
  and XaStorageEngine.  XaStorageEngine derives from
  TransactionalStorageEngine and creates the XA Resource
  Manager API for storage engines.

  - The methods moved from StorageEngine to TransactionalStorageEngine
    include releaseTemporaryLatches(), startConsistentSnapshot(), 
    commit(), rollback(), setSavepoint(), releaseSavepoint(),
    rollbackToSavepoint() and hasTwoPhaseCommit()
  - The methods moved from StorageEngine to XaStorageEngine
    include recover(), commitXid(), rollbackXid(), and prepare()

* Places all static "EngineVector"s into their proper
  namespaces (typedefs belong in header files, not implementation files)
  and places all static methods corresponding
  to either only transactional engines or only XA engines
  into their respective files in /drizzled/plugin/

* Modifies the InnoDB "handler" files to extend plugin::XaStorageEngine
  and not plugin::StorageEngine

The next step, as outlined in the wiki spec page above, is to isolate
the XA Resource Manager API into its own plugin class and modify
plugin::XaStorageEngine to implement plugin::XaResourceManager via
composition.  This is necessary to enable building plugins which can
participate in an XA transaction *without having to have that plugin
implement the entire storage engine API*

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
21
21
#ifndef DRIZZLED_TMP_TABLE_PARAM_H
22
22
#define DRIZZLED_TMP_TABLE_PARAM_H
23
23
 
24
 
#include <plugin/myisam/myisam.h>
25
 
 
26
24
namespace drizzled
27
25
{
28
26
 
29
 
class CopyField;
30
 
 
31
27
/*
32
28
  Param to create temporary tables when doing SELECT:s
33
29
  NOTE
42
38
  void operator=(Tmp_Table_Param &);
43
39
 
44
40
public:
45
 
  KeyInfo *keyinfo;
 
41
  KEY *keyinfo;
46
42
  List<Item> copy_funcs;
47
43
  List<Item> save_copy_funcs;
48
44
  CopyField *copy_field, *copy_field_end;
74
70
  uint32_t  convert_blob_length;
75
71
 
76
72
  const CHARSET_INFO *table_charset;
 
73
  /*
 
74
    If true, create_tmp_field called from create_tmp_table will convert
 
75
    all BIT fields to 64-bit longs. This is a workaround the limitation
 
76
    that MEMORY tables cannot index BIT columns.
 
77
  */
 
78
  bool bit_fields_as_long;
77
79
 
78
 
  Tmp_Table_Param() :
79
 
    keyinfo(0),
80
 
    copy_funcs(),
81
 
    save_copy_funcs(),
82
 
    copy_field(0),
83
 
    copy_field_end(0),
84
 
    save_copy_field(0),
85
 
    save_copy_field_end(0),
86
 
    group_buff(0),
87
 
    items_to_copy(0),
88
 
    recinfo(0),
89
 
    start_recinfo(0),
90
 
    end_write_records(0),
91
 
    field_count(0),
92
 
    sum_func_count(0),
93
 
    func_count(0),
94
 
    hidden_field_count(0),
 
80
  Tmp_Table_Param()
 
81
    :copy_field(0),
95
82
    group_parts(0),
96
83
    group_length(0),
97
84
    group_null_parts(0),
98
 
    quick_group(0),
99
 
    using_indirect_summary_function(false),
100
85
    schema_table(false),
101
86
    precomputed_group_by(false),
102
87
    force_copy_fields(false),
103
88
    convert_blob_length(0),
104
 
    table_charset(0)
 
89
    bit_fields_as_long(false)
105
90
  {}
106
 
 
107
91
  ~Tmp_Table_Param()
108
92
  {
109
93
    cleanup();