diff options
Diffstat (limited to 'ndb/include')
-rw-r--r-- | ndb/include/kernel/BlockNumbers.h | 4 | ||||
-rw-r--r-- | ndb/include/kernel/GlobalSignalNumbers.h | 4 | ||||
-rw-r--r-- | ndb/include/kernel/kernel_types.h | 7 | ||||
-rw-r--r-- | ndb/include/kernel/signaldata/AlterTable.hpp | 25 | ||||
-rw-r--r-- | ndb/include/kernel/signaldata/ApiBroadcast.hpp | 31 | ||||
-rw-r--r-- | ndb/include/ndbapi/NdbDictionary.hpp | 5 |
6 files changed, 68 insertions, 8 deletions
diff --git a/ndb/include/kernel/BlockNumbers.h b/ndb/include/kernel/BlockNumbers.h index cb3cc697eee..49b5842ac4e 100644 --- a/ndb/include/kernel/BlockNumbers.h +++ b/ndb/include/kernel/BlockNumbers.h @@ -44,8 +44,7 @@ #define TRIX 0xFF #define DBUTIL 0x100 #define SUMA 0x101 -#define GREP 0x102 -#define DBTUX 0x103 +#define DBTUX 0x102 const BlockReference BACKUP_REF = numberToRef(BACKUP, 0); const BlockReference DBTC_REF = numberToRef(DBTC, 0); @@ -61,7 +60,6 @@ const BlockReference CMVMI_REF = numberToRef(CMVMI, 0); const BlockReference TRIX_REF = numberToRef(TRIX, 0); const BlockReference DBUTIL_REF = numberToRef(DBUTIL, 0); const BlockReference SUMA_REF = numberToRef(SUMA, 0); -const BlockReference GREP_REF = numberToRef(GREP, 0); const BlockReference DBTUX_REF = numberToRef(DBTUX, 0); const BlockNumber MIN_BLOCK_NO = BACKUP; diff --git a/ndb/include/kernel/GlobalSignalNumbers.h b/ndb/include/kernel/GlobalSignalNumbers.h index 9413f4ef56a..ff3690d60a5 100644 --- a/ndb/include/kernel/GlobalSignalNumbers.h +++ b/ndb/include/kernel/GlobalSignalNumbers.h @@ -777,8 +777,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; /** * Grep signals */ -#define GSN_GREP_SUB_CREATE_REQ 606 -#define GSN_GREP_SUB_CREATE_REF 607 +#define GSN_ALTER_TABLE_REP 606 +#define GSN_API_BROADCAST_REP 607 #define GSN_GREP_SUB_CREATE_CONF 608 #define GSN_GREP_CREATE_REQ 609 #define GSN_GREP_CREATE_REF 610 diff --git a/ndb/include/kernel/kernel_types.h b/ndb/include/kernel/kernel_types.h index b176d20798c..e16e61471e7 100644 --- a/ndb/include/kernel/kernel_types.h +++ b/ndb/include/kernel/kernel_types.h @@ -36,6 +36,13 @@ enum Operation_t { #endif }; +inline +Uint32 +table_version_major(Uint32 ver) +{ + return ver & 0x00FFFFFF; +} + #endif diff --git a/ndb/include/kernel/signaldata/AlterTable.hpp b/ndb/include/kernel/signaldata/AlterTable.hpp index 173a9acf9ed..16c9eb204c9 100644 --- a/ndb/include/kernel/signaldata/AlterTable.hpp +++ b/ndb/include/kernel/signaldata/AlterTable.hpp @@ -129,7 +129,8 @@ public: InvalidPrimaryKeySize = 739, NullablePrimaryKey = 740, UnsupportedChange = 741, - BackupInProgress = 762 + BackupInProgress = 762, + IncompatibleVersions = 763 }; private: @@ -177,4 +178,26 @@ private: Uint32 tableVersion; }; +/** + * Inform API about change of table definition + */ +struct AlterTableRep +{ + friend bool printALTER_TABLE_REP(FILE*, const Uint32*, Uint32, Uint16); + + STATIC_CONST( SignalLength = 3 ); + + enum Change_type + { + CT_ALTERED = 0x1, + CT_DROPPED = 0x2 + }; + + Uint32 tableId; + Uint32 tableVersion; + Uint32 changeType; + + SECTION( TABLE_NAME = 0 ); +}; + #endif diff --git a/ndb/include/kernel/signaldata/ApiBroadcast.hpp b/ndb/include/kernel/signaldata/ApiBroadcast.hpp new file mode 100644 index 00000000000..8050326ce78 --- /dev/null +++ b/ndb/include/kernel/signaldata/ApiBroadcast.hpp @@ -0,0 +1,31 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef API_BROADCAST_HPP +#define API_BROADCAST_HPP + +#include "SignalData.hpp" + +struct ApiBroadcastRep +{ + STATIC_CONST( SignalLength = 2 ); + + Uint32 gsn; + Uint32 minVersion; + Uint32 theData[1]; +}; + +#endif diff --git a/ndb/include/ndbapi/NdbDictionary.hpp b/ndb/include/ndbapi/NdbDictionary.hpp index 85615f3aa66..a541cd5190e 100644 --- a/ndb/include/ndbapi/NdbDictionary.hpp +++ b/ndb/include/ndbapi/NdbDictionary.hpp @@ -77,9 +77,10 @@ public: ///< changes to take effect Retrieved, ///< The object exist and has been read ///< into main memory from NDB Kernel - Invalid ///< The object has been invalidated + Invalid, ///< The object has been invalidated ///< and should not be used - + Altered ///< Table has been altered in NDB kernel + ///< but is still valid for usage }; /** |