~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/ndb/include/kernel/signaldata/AlterTab.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2003 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
#ifndef ALTER_TAB_HPP
 
17
#define ALTER_TAB_HPP
 
18
 
 
19
#include "SignalData.hpp"
 
20
#include "GlobalSignalNumbers.h"
 
21
 
 
22
/**
 
23
 * AlterTab
 
24
 *
 
25
 * Implemenatation of AlterTable
 
26
 */
 
27
class AlterTabReq {
 
28
  /**
 
29
   * Sender(s) / Reciver(s)
 
30
   */
 
31
  friend class Dbdict;
 
32
  friend class Dbdih;
 
33
  friend class Dbtc;
 
34
  friend class Dblqh;
 
35
  friend class Suma;
 
36
 
 
37
  /**
 
38
   * For printing
 
39
   */
 
40
  friend bool printALTER_TAB_REQ(FILE*, const Uint32*, Uint32, Uint16);
 
41
  
 
42
public:
 
43
  STATIC_CONST( SignalLength = 9 );
 
44
  
 
45
  enum RequestType {
 
46
    AlterTablePrepare = 0, // Prepare alter table
 
47
    AlterTableCommit = 1,  // Commit alter table
 
48
    AlterTableRevert = 2   // Prepare failed, revert instead
 
49
  };
 
50
private:
 
51
  Uint32 senderRef;
 
52
  Uint32 senderData;
 
53
  Uint32 clientRef;
 
54
  Uint32 clientData;
 
55
 
 
56
  Uint32 changeMask;
 
57
  Uint32 tableId;
 
58
  Uint32 tableVersion;
 
59
  Uint32 gci;
 
60
  Uint32 requestType;
 
61
 
 
62
  SECTION( DICT_TAB_INFO = 0 );
 
63
};
 
64
 
 
65
struct AlterTabRef {
 
66
  /**
 
67
   * Sender(s) / Reciver(s)
 
68
   */
 
69
  friend class Dbdict;
 
70
  friend class Dbdih;
 
71
  friend class Dbtc;
 
72
  friend class Dblqh;
 
73
  friend class Dbtup;
 
74
  friend class SafeCounter;
 
75
  
 
76
  /**
 
77
   * For printing
 
78
   */
 
79
  friend bool printALTER_TAB_REF(FILE *, const Uint32 *, Uint32, Uint16);
 
80
  
 
81
  STATIC_CONST( SignalLength = 7 );
 
82
  STATIC_CONST( GSN = GSN_ALTER_TAB_REF );
 
83
 
 
84
  enum ErrorCode {
 
85
    NF_FakeErrorREF = 255
 
86
  };
 
87
 
 
88
  Uint32 senderRef;
 
89
  Uint32 senderData;
 
90
  Uint32 errorCode;
 
91
  Uint32 errorLine; 
 
92
  Uint32 errorKey;
 
93
  Uint32 errorStatus;
 
94
  Uint32 requestType;
 
95
};
 
96
 
 
97
class AlterTabConf {
 
98
  /**
 
99
   * Sender(s) / Reciver(s)
 
100
   */
 
101
  friend class Dbdict;
 
102
  friend class Dbdih;
 
103
  friend class Dbtc;
 
104
  friend class Dblqh;
 
105
  friend class Dbtup;
 
106
  
 
107
  /**
 
108
   * For printing
 
109
   */
 
110
  friend bool printALTER_TAB_CONF(FILE *, const Uint32 *, Uint32, Uint16);
 
111
  
 
112
public:
 
113
  STATIC_CONST( SignalLength = 7 );
 
114
 
 
115
private:
 
116
  Uint32 senderRef;
 
117
  Uint32 senderData;
 
118
  Uint32 changeMask;
 
119
  Uint32 tableId;
 
120
  Uint32 tableVersion;
 
121
  Uint32 gci;
 
122
  Uint32 requestType;
 
123
};
 
124
 
 
125
#endif