1 /*
2    Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
3 
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License, version 2.0,
6    as published by the Free Software Foundation.
7 
8    This program is also distributed with certain software (including
9    but not limited to OpenSSL) that is licensed under separate terms,
10    as designated in a particular file or component or in included license
11    documentation.  The authors of MySQL hereby grant you an additional
12    permission to link the program and your derivative works with the
13    separately licensed software that they have included with MySQL.
14 
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License, version 2.0, for more details.
19 
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
23 */
24 
25 #ifndef TCCOMMITCONF_HPP
26 #define TCCOMMITCONF_HPP
27 
28 #include "SignalData.hpp"
29 
30 #define JAM_FILE_ID 163
31 
32 
33 /**
34  * This is signal is sent from TC to API
35  * It means that the transaction was committed
36  */
37 class TcCommitConf {
38   /**
39    * Sender(s)
40    */
41   friend class Dbtc;
42 
43   /**
44    *  Reciver(s)
45    */
46   friend class Ndb;
47   friend class NdbImpl;
48   friend class NdbTransaction;
49 
50   friend class TransporterFacade;
51 
52 public:
53   STATIC_CONST( SignalLength = 5 );
54 private:
55 
56   /**
57    * apiConnectPtr
58    *
59    * Bit 0 (lowest) is used as indicator
60    *                if == 1 then tc expects a commit ack
61    */
62   Uint32 apiConnectPtr;
63 
64   Uint32 transId1;
65   Uint32 transId2;
66   Uint32 gci_hi;
67   Uint32 gci_lo;
68 };
69 
70 class TcCommitRef {
71   /**
72    * Sender(s)
73    */
74   friend class Dbtc;
75 
76   /**
77    *  Reciver(s)
78    */
79   friend class NdbTransaction;
80 
81 public:
82   STATIC_CONST( SignalLength = 4 );
83 private:
84 
85   Uint32 apiConnectPtr;
86   Uint32 transId1;
87   Uint32 transId2;
88   Uint32 errorCode;
89 };
90 
91 
92 #undef JAM_FILE_ID
93 
94 #endif
95