diff options
author | unknown <monty@mysql.com> | 2004-10-29 19:26:52 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-10-29 19:26:52 +0300 |
commit | f095274fe8c3d3394d6c0ce0a68f4bea04311999 (patch) | |
tree | 23bcc9a71fe7237887a111b158e30f5a6bb665d3 /ndb/include/kernel | |
parent | f41bba8c6156a7adf4c67dfa75e16112767a5d3c (diff) | |
parent | 5be6c328f5a9f78f37176bbbd88a538fa3b65fe9 (diff) | |
download | mariadb-git-f095274fe8c3d3394d6c0ce0a68f4bea04311999.tar.gz |
merge with 4.1
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/triggers/post-commit:
Auto merged
Docs/Support/texi2html:
Auto merged
Makefile.am:
Auto merged
client/Makefile.am:
Auto merged
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
include/my_base.h:
Auto merged
include/my_global.h:
Auto merged
include/my_pthread.h:
Auto merged
include/my_sys.h:
Auto merged
include/my_time.h:
Auto merged
include/mysql.h:
Auto merged
include/mysql_com.h:
Auto merged
innobase/buf/buf0buf.c:
Auto merged
innobase/include/row0mysql.h:
Auto merged
innobase/row/row0sel.c:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/examples/Makefile.am:
Auto merged
myisam/mi_check.c:
Auto merged
mysql-test/include/ps_modify.inc:
Auto merged
mysql-test/install_test_db.sh:
Auto merged
mysql-test/r/alter_table.result:
Auto merged
mysql-test/r/auto_increment.result:
Auto merged
mysql-test/r/bdb.result:
Auto merged
mysql-test/r/ctype_latin1_de.result:
Auto merged
mysql-test/r/ctype_recoding.result:
Auto merged
mysql-test/r/fulltext.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_if.result:
Auto merged
mysql-test/t/derived.test:
Auto merged
mysql-test/t/insert.test:
merge with 4.1
Fixed test case to not use 'if exists' when it shouldn't
mysql-test/t/range.test:
merge with 4.1
Added missing drop table
sql/ha_ndbcluster.cc:
merge with 4.1
Simple optimization: use max() instead of ? :
sql/item_func.cc:
merge with 4.1
(Added back old variable names for easier merges)
sql/opt_range.cc:
merge with 4.1
Removed argument 'parent_alloc' from QUICK_RANGE_SELECT as this was not used
Added assert if using QUICK_GROUP_MIN_MAX_SELECT with parent_alloc as the init() function can't handle this
Changed back get_quick_select_for_ref() to use it's own alloc root becasue this function may be called several times for one query
sql/sql_handler.cc:
merge with 4.1
change variable 'err' to 'error' as same function had a label named 'err'
sql/sql_update.cc:
Use multi-update code from 5.0 instead of 4.1
We will fix the locking code shortly in 5.0 to be faster than in 4.1
Diffstat (limited to 'ndb/include/kernel')
32 files changed, 560 insertions, 344 deletions
diff --git a/ndb/include/kernel/AttributeHeader.hpp b/ndb/include/kernel/AttributeHeader.hpp index 91190fdd223..b807b4ef4f1 100644 --- a/ndb/include/kernel/AttributeHeader.hpp +++ b/ndb/include/kernel/AttributeHeader.hpp @@ -30,6 +30,14 @@ class AttributeHeader { friend class Suma; public: + /** + * Psuedo columns + */ + STATIC_CONST( PSUEDO = 0x8000 ); + STATIC_CONST( FRAGMENT = 0xFFFE ); + STATIC_CONST( ROW_COUNT = 0xFFFD ); + STATIC_CONST( COMMIT_COUNT = 0xFFFC ); + /** Initialize AttributeHeader at location aHeaderPtr */ static AttributeHeader& init(void* aHeaderPtr, Uint32 anAttributeId, Uint32 aDataSize); diff --git a/ndb/include/kernel/BlockNumbers.h b/ndb/include/kernel/BlockNumbers.h index e89a82ee0cb..cb3cc697eee 100644 --- a/ndb/include/kernel/BlockNumbers.h +++ b/ndb/include/kernel/BlockNumbers.h @@ -20,13 +20,13 @@ #include <kernel_types.h> #include <RefConvert.hpp> -// 240 +/* 240 */ #define MIN_API_BLOCK_NO 0x8000 -// 2047 +/* 2047 */ #define API_PACKED 0x07ff -// 4002 +/* 4002 */ #define API_CLUSTERMGR 0x0FA2 #define BACKUP 0xF4 diff --git a/ndb/include/kernel/GlobalSignalNumbers.h b/ndb/include/kernel/GlobalSignalNumbers.h index 8941fa6b381..9413f4ef56a 100644 --- a/ndb/include/kernel/GlobalSignalNumbers.h +++ b/ndb/include/kernel/GlobalSignalNumbers.h @@ -23,14 +23,8 @@ * * When adding a new signal, remember to update MAX_GSN and SignalNames.cpp */ - - - const GlobalSignalNumber MAX_GSN = 712; - - - struct GsnName { GlobalSignalNumber gsn; const char * name; @@ -84,7 +78,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_SCAN_NEXTREQ 28 #define GSN_SCAN_TABCONF 29 -// 30 unused +/* 30 unused */ #define GSN_SCAN_TABREF 31 #define GSN_SCAN_TABREQ 32 #define GSN_KEYINFO20 33 @@ -97,42 +91,42 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_TCSEIZEREF 38 #define GSN_TCSEIZEREQ 39 -// 40 unused -// 41 unused -// 42 unused -// 43 unused -// 44 unused -// 45 unused -// 46 unused -// 47 unused -// 48 unused -// 49 unused -// 50 unused -// 51 unused -// 52 unused -// 53 unused -// 54 unused -// 55 unused -// 56 unused -// 57 unused -// 58 unused -// 59 unused -// 60 unused -// 61 unused -// 62 unused -// 63 unused -// 64 unused -// 65 unused -// 66 unused +/* 40 unused */ +/* 41 unused */ +/* 42 unused */ +/* 43 unused */ +/* 44 unused */ +/* 45 unused */ +/* 46 unused */ +/* 47 unused */ +/* 48 unused */ +/* 49 unused */ +/* 50 unused */ +/* 51 unused */ +/* 52 unused */ +/* 53 unused */ +/* 54 unused */ +/* 55 unused */ +/* 56 unused */ +/* 57 unused */ +/* 58 unused */ +/* 59 unused */ +/* 60 unused */ +/* 61 unused */ +/* 62 unused */ +/* 63 unused */ +/* 64 unused */ +/* 65 unused */ +/* 66 unused */ /** * These are used only by kernel */ #define GSN_ACC_ABORTCONF 67 -// 68 unused -// 69 unused -// 70 unused +/* 68 unused */ +/* 69 unused */ +/* 70 unused */ #define GSN_ACC_ABORTREQ 71 #define GSN_ACC_CHECK_SCAN 72 #define GSN_ACC_COMMITCONF 73 @@ -178,42 +172,42 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_API_FAILCONF 113 #define GSN_API_FAILREQ 114 #define GSN_CNTR_START_REQ 115 -// 116 not unused +/* 116 not unused */ #define GSN_CNTR_START_REF 117 #define GSN_CNTR_START_CONF 118 #define GSN_CNTR_START_REP 119 -// 120 unused -// 121 unused -// 122 unused -// 123 unused -// 124 unused +/* 120 unused */ +/* 121 unused */ +/* 122 unused */ +/* 123 unused */ +/* 124 unused */ #define GSN_CHECK_LCP_STOP 125 -#define GSN_CLOSE_COMCONF 126 // local -#define GSN_CLOSE_COMREQ 127 // local -#define GSN_CM_ACKADD 128 // distr. -// 129 unused -#define GSN_CM_ADD 130 // distr. -// 131 unused -// 132 not unused -// 133 not unused -#define GSN_CM_HEARTBEAT 134 // distr. -// 135 unused -// 136 unused -// 137 unused -#define GSN_CM_NODEINFOCONF 138 // distr. -#define GSN_CM_NODEINFOREF 139 // distr. -#define GSN_CM_NODEINFOREQ 140 // distr. -#define GSN_CM_REGCONF 141 // distr. -#define GSN_CM_REGREF 142 // distr. -#define GSN_CM_REGREQ 143 // distr. -// 144 unused -// 145 unused -// 146 unused -#define GSN_CM_ADD_REP 147 // local -// 148 unused -// 149 unused -// 150 unused -#define GSN_CNTR_WAITREP 151 // distr. +#define GSN_CLOSE_COMCONF 126 /* local */ +#define GSN_CLOSE_COMREQ 127 /* local */ +#define GSN_CM_ACKADD 128 /* distr. */ +/* 129 unused */ +#define GSN_CM_ADD 130 /* distr. */ +/* 131 unused */ +/* 132 not unused */ +/* 133 not unused */ +#define GSN_CM_HEARTBEAT 134 /* distr. */ +/* 135 unused */ +/* 136 unused */ +/* 137 unused */ +#define GSN_CM_NODEINFOCONF 138 /* distr. */ +#define GSN_CM_NODEINFOREF 139 /* distr. */ +#define GSN_CM_NODEINFOREQ 140 /* distr. */ +#define GSN_CM_REGCONF 141 /* distr. */ +#define GSN_CM_REGREF 142 /* distr. */ +#define GSN_CM_REGREQ 143 /* distr. */ +/* 144 unused */ +/* 145 unused */ +/* 146 unused */ +#define GSN_CM_ADD_REP 147 /* local */ +/* 148 unused */ +/* 149 unused */ +/* 150 unused */ +#define GSN_CNTR_WAITREP 151 /* distr. */ #define GSN_COMMIT 152 #define GSN_COMMIT_FAILCONF 153 #define GSN_COMMIT_FAILREQ 154 @@ -226,7 +220,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_COMPLETEREQ 162 #define GSN_CONNECT_REP 163 #define GSN_CONTINUEB 164 -// 165 not unused +/* 165 not unused */ #define GSN_COPY_ACTIVECONF 166 #define GSN_COPY_ACTIVEREF 167 #define GSN_COPY_ACTIVEREQ 168 @@ -249,9 +243,9 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_DIADDTABCONF 185 #define GSN_DIADDTABREF 186 #define GSN_DIADDTABREQ 187 -// 188 not unused -// 189 not unused -// 190 not unused +/* 188 not unused */ +/* 189 not unused */ +/* 190 not unused */ #define GSN_DICTSTARTCONF 191 #define GSN_DICTSTARTREQ 192 @@ -307,9 +301,9 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_DIH_RESTARTREF 218 #define GSN_DIH_RESTARTREQ 219 -// 220 not unused -// 221 not unused -// 222 not unused +/* 220 not unused */ +/* 221 not unused */ +/* 222 not unused */ #define GSN_EMPTY_LCP_REQ 223 #define GSN_EMPTY_LCP_CONF 224 @@ -321,8 +315,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_MASTER_GCPREF 228 #define GSN_MASTER_GCPREQ 229 -// 230 not unused -// 231 not unused +/* 230 not unused */ +/* 231 not unused */ #define GSN_DIRELEASECONF 232 #define GSN_DIRELEASEREF 233 @@ -394,8 +388,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_LCP_HOLDOPREQ 299 #define GSN_SHRINKCHECK2 301 #define GSN_GET_SCHEMA_INFOREQ 302 -// 303 not unused -// 304 not unused +/* 303 not unused */ +/* 304 not unused */ #define GSN_LQH_RESTART_OP 305 #define GSN_LQH_TRANSCONF 306 #define GSN_LQH_TRANSREQ 307 @@ -427,12 +421,12 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_NEXT_SCANREQ 332 #define GSN_NEXTOPERATION 333 -#define GSN_READ_CONFIG_REQ 334 // new name for sizealt, local -#define GSN_READ_CONFIG_CONF 335 // new name for sizealt, local +#define GSN_READ_CONFIG_REQ 334 /* new name for sizealt, local */ +#define GSN_READ_CONFIG_CONF 335 /* new name for sizealt, local */ -// 336 unused -// 337 unused -// 338 unused +/* 336 unused */ +/* 337 unused */ +/* 338 unused */ #define GSN_OPEN_COMCONF 339 #define GSN_OPEN_COMREF 340 #define GSN_OPEN_COMREQ 341 @@ -458,7 +452,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_TUP_ALLOCREQ 360 #define GSN_TUP_DEALLOCREQ 361 -// 362 not unused +/* 362 not unused */ #define GSN_TUP_WRITELOG_REQ 363 #define GSN_LQH_WRITELOG_REQ 364 @@ -513,16 +507,16 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_TEST_ORD 407 #define GSN_TESTSIG 408 #define GSN_TIME_SIGNAL 409 -// 410 unused -// 411 unused -// 412 unused +/* 410 unused */ +/* 411 unused */ +/* 412 unused */ #define GSN_TUP_ABORTREQ 414 #define GSN_TUP_ADD_ATTCONF 415 #define GSN_TUP_ADD_ATTRREF 416 #define GSN_TUP_ADD_ATTRREQ 417 #define GSN_TUP_ATTRINFO 418 #define GSN_TUP_COMMITREQ 419 -// 420 unused +/* 420 unused */ #define GSN_TUP_LCPCONF 421 #define GSN_TUP_LCPREF 422 #define GSN_TUP_LCPREQ 423 @@ -559,8 +553,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_STATISTICS_CONF 454 #define GSN_START_ORD 455 -// 456 unused -// 457 unused +/* 456 unused */ +/* 457 unused */ #define GSN_EVENT_SUBSCRIBE_REQ 458 #define GSN_EVENT_SUBSCRIBE_CONF 459 @@ -582,7 +576,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_CHECKNODEGROUPSREQ 471 #define GSN_CHECKNODEGROUPSCONF 472 -// 473 unused +/* 473 unused */ #define GSN_ARBIT_PREPREQ 474 #define GSN_ARBIT_PREPCONF 475 #define GSN_ARBIT_PREPREF 476 @@ -618,7 +612,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_WAIT_GCP_REF 500 #define GSN_WAIT_GCP_CONF 501 -// 502 not used +/* 502 not used */ /** * Trigger and index signals @@ -738,7 +732,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_SUB_STOP_REQ 572 #define GSN_SUB_STOP_REF 573 #define GSN_SUB_STOP_CONF 574 -// 575 unused +/* 575 unused */ #define GSN_SUB_CREATE_REQ 576 #define GSN_SUB_CREATE_REF 577 #define GSN_SUB_CREATE_CONF 578 @@ -838,7 +832,7 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_GREP_REMOVE_REF 654 #define GSN_GREP_REMOVE_CONF 655 -// Start Global Replication +/* Start Global Replication */ #define GSN_GREP_REQ 656 /** @@ -897,9 +891,8 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_TUX_MAINT_CONF 678 #define GSN_TUX_MAINT_REF 679 -// not used 680 -// not used 712 -// not used 681 +/* not used 680 */ +/* not used 681 */ /** * from mgmtsrvr to NDBCNTR @@ -910,10 +903,10 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_API_VERSION_REQ 697 #define GSN_API_VERSION_CONF 698 -// not used 686 -// not used 687 -// not used 689 -// not used 690 +/* not used 686 */ +/* not used 687 */ +/* not used 689 */ +/* not used 690 */ /** * SUMA restart protocol @@ -922,9 +915,9 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_SUMA_HANDOVER_REQ 692 #define GSN_SUMA_HANDOVER_CONF 693 -// not used 694 -// not used 695 -// not used 696 +/* not used 694 */ +/* not used 695 */ +/* not used 696 */ /** * GREP restart protocol @@ -951,6 +944,6 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES; #define GSN_TUX_BOUND_INFO 710 #define GSN_ACC_LOCKREQ 711 - +#define GSN_READ_PSUEDO_REQ 712 #endif diff --git a/ndb/include/kernel/Interpreter.hpp b/ndb/include/kernel/Interpreter.hpp index 74399f5732e..69c952ea7c3 100644 --- a/ndb/include/kernel/Interpreter.hpp +++ b/ndb/include/kernel/Interpreter.hpp @@ -45,31 +45,31 @@ public: /** * Instructions */ - static const Uint32 READ_ATTR_INTO_REG = 1; - static const Uint32 WRITE_ATTR_FROM_REG = 2; - static const Uint32 LOAD_CONST_NULL = 3; - static const Uint32 LOAD_CONST16 = 4; - static const Uint32 LOAD_CONST32 = 5; - static const Uint32 LOAD_CONST64 = 6; - static const Uint32 ADD_REG_REG = 7; - static const Uint32 SUB_REG_REG = 8; - static const Uint32 BRANCH = 9; - static const Uint32 BRANCH_REG_EQ_NULL = 10; - static const Uint32 BRANCH_REG_NE_NULL = 11; - static const Uint32 BRANCH_EQ_REG_REG = 12; - static const Uint32 BRANCH_NE_REG_REG = 13; - static const Uint32 BRANCH_LT_REG_REG = 14; - static const Uint32 BRANCH_LE_REG_REG = 15; - static const Uint32 BRANCH_GT_REG_REG = 16; - static const Uint32 BRANCH_GE_REG_REG = 17; - static const Uint32 EXIT_OK = 18; - static const Uint32 EXIT_REFUSE = 19; - static const Uint32 CALL = 20; - static const Uint32 RETURN = 21; - static const Uint32 EXIT_OK_LAST = 22; - static const Uint32 BRANCH_ATTR_OP_ARG = 23; - static const Uint32 BRANCH_ATTR_EQ_NULL = 24; - static const Uint32 BRANCH_ATTR_NE_NULL = 25; + STATIC_CONST( READ_ATTR_INTO_REG = 1 ); + STATIC_CONST( WRITE_ATTR_FROM_REG = 2 ); + STATIC_CONST( LOAD_CONST_NULL = 3 ); + STATIC_CONST( LOAD_CONST16 = 4 ); + STATIC_CONST( LOAD_CONST32 = 5 ); + STATIC_CONST( LOAD_CONST64 = 6 ); + STATIC_CONST( ADD_REG_REG = 7 ); + STATIC_CONST( SUB_REG_REG = 8 ); + STATIC_CONST( BRANCH = 9 ); + STATIC_CONST( BRANCH_REG_EQ_NULL = 10 ); + STATIC_CONST( BRANCH_REG_NE_NULL = 11 ); + STATIC_CONST( BRANCH_EQ_REG_REG = 12 ); + STATIC_CONST( BRANCH_NE_REG_REG = 13 ); + STATIC_CONST( BRANCH_LT_REG_REG = 14 ); + STATIC_CONST( BRANCH_LE_REG_REG = 15 ); + STATIC_CONST( BRANCH_GT_REG_REG = 16 ); + STATIC_CONST( BRANCH_GE_REG_REG = 17 ); + STATIC_CONST( EXIT_OK = 18 ); + STATIC_CONST( EXIT_REFUSE = 19 ); + STATIC_CONST( CALL = 20 ); + STATIC_CONST( RETURN = 21 ); + STATIC_CONST( EXIT_OK_LAST = 22 ); + STATIC_CONST( BRANCH_ATTR_OP_ARG = 23 ); + STATIC_CONST( BRANCH_ATTR_EQ_NULL = 24 ); + STATIC_CONST( BRANCH_ATTR_NE_NULL = 25 ); /** * Macros for creating code diff --git a/ndb/include/kernel/LogLevel.hpp b/ndb/include/kernel/LogLevel.hpp index 10cd0d43bee..467f0604edd 100644 --- a/ndb/include/kernel/LogLevel.hpp +++ b/ndb/include/kernel/LogLevel.hpp @@ -45,81 +45,31 @@ public: * Copy operator */ LogLevel & operator= (const LogLevel &); - - static const Uint32 MIN_LOGLEVEL_ID = CFG_LOGLEVEL_STARTUP; - - enum EventCategory { - /** - * Events during all kind of startups - */ - llStartUp = CFG_LOGLEVEL_STARTUP - MIN_LOGLEVEL_ID, - - /** - * Events during shutdown - */ - llShutdown = CFG_LOGLEVEL_SHUTDOWN - MIN_LOGLEVEL_ID, - - /** - * Transaction statistics - * Job level - * TCP/IP speed - */ - llStatistic = CFG_LOGLEVEL_STATISTICS - MIN_LOGLEVEL_ID, - - /** - * Checkpoints - */ - llCheckpoint = CFG_LOGLEVEL_CHECKPOINT - MIN_LOGLEVEL_ID, - - /** - * Events during node restart - */ - llNodeRestart = CFG_LOGLEVEL_NODERESTART - MIN_LOGLEVEL_ID, - - /** - * Events related to connection / communication - */ - llConnection = CFG_LOGLEVEL_CONNECTION - MIN_LOGLEVEL_ID, - - /** - * Assorted event w.r.t unexpected happenings - */ - llError = CFG_LOGLEVEL_ERROR - MIN_LOGLEVEL_ID, - - /** - * Assorted event w.r.t warning - */ - llWarning = CFG_LOGLEVEL_WARNING - MIN_LOGLEVEL_ID, - - /** - * Assorted event w.r.t information - */ - llInfo = CFG_LOGLEVEL_INFO - MIN_LOGLEVEL_ID, - - /** - * Events related to global replication - */ - llGrep = CFG_LOGLEVEL_GREP - MIN_LOGLEVEL_ID - }; - struct LogLevelCategoryName { - const char* name; + enum EventCategory { + llInvalid = -1, + llStartUp = CFG_LOGLEVEL_STARTUP - CFG_MIN_LOGLEVEL, + llShutdown = CFG_LOGLEVEL_SHUTDOWN - CFG_MIN_LOGLEVEL, + llStatistic = CFG_LOGLEVEL_STATISTICS - CFG_MIN_LOGLEVEL, + llCheckpoint = CFG_LOGLEVEL_CHECKPOINT - CFG_MIN_LOGLEVEL, + llNodeRestart = CFG_LOGLEVEL_NODERESTART - CFG_MIN_LOGLEVEL, + llConnection = CFG_LOGLEVEL_CONNECTION - CFG_MIN_LOGLEVEL, + llInfo = CFG_LOGLEVEL_INFO - CFG_MIN_LOGLEVEL, + llWarning = CFG_LOGLEVEL_WARNING - CFG_MIN_LOGLEVEL, + llError = CFG_LOGLEVEL_ERROR - CFG_MIN_LOGLEVEL, + llGrep = CFG_LOGLEVEL_GREP - CFG_MIN_LOGLEVEL, + llDebug = CFG_LOGLEVEL_DEBUG - CFG_MIN_LOGLEVEL + ,llBackup = CFG_LOGLEVEL_BACKUP - CFG_MIN_LOGLEVEL }; /** - * Log/event level category names. Remember to update the names whenever - * a new category is added. - */ - static const LogLevelCategoryName LOGLEVEL_CATEGORY_NAME[]; - - /** * No of categories */ -#define _LOGLEVEL_CATEGORIES 10 - static const Uint32 LOGLEVEL_CATEGORIES = _LOGLEVEL_CATEGORIES; - +#define _LOGLEVEL_CATEGORIES (CFG_MAX_LOGLEVEL - CFG_MIN_LOGLEVEL + 1) + STATIC_CONST( LOGLEVEL_CATEGORIES = _LOGLEVEL_CATEGORIES ); + void clear(); - + /** * Note level is valid as 0-15 */ @@ -130,26 +80,33 @@ public: */ Uint32 getLogLevel(EventCategory ec) const; + /** + * Set this= max(this, ll) per category + */ + LogLevel& set_max(const LogLevel& ll); + + bool operator==(const LogLevel& l) const { + return memcmp(this, &l, sizeof(* this)) == 0; + } + + LogLevel& operator=(const class EventSubscribeReq & req); + private: /** * The actual data */ - Uint32 logLevelData[LOGLEVEL_CATEGORIES]; - - LogLevel(const LogLevel &); + Uint8 logLevelData[LOGLEVEL_CATEGORIES]; }; inline LogLevel::LogLevel(){ - clear(); + clear(); } inline LogLevel & LogLevel::operator= (const LogLevel & org){ - for(Uint32 i = 0; i<LOGLEVEL_CATEGORIES; i++){ - logLevelData[i] = org.logLevelData[i]; - } + memcpy(logLevelData, org.logLevelData, sizeof(logLevelData)); return * this; } @@ -165,7 +122,7 @@ inline void LogLevel::setLogLevel(EventCategory ec, Uint32 level){ assert(ec >= 0 && (Uint32) ec < LOGLEVEL_CATEGORIES); - logLevelData[ec] = level; + logLevelData[ec] = (Uint8)level; } inline @@ -173,8 +130,30 @@ Uint32 LogLevel::getLogLevel(EventCategory ec) const{ assert(ec >= 0 && (Uint32) ec < LOGLEVEL_CATEGORIES); - return logLevelData[ec]; + return (Uint32)logLevelData[ec]; +} + +inline +LogLevel & +LogLevel::set_max(const LogLevel & org){ + for(Uint32 i = 0; i<LOGLEVEL_CATEGORIES; i++){ + if(logLevelData[i] < org.logLevelData[i]) + logLevelData[i] = org.logLevelData[i]; + } + return * this; } +#include <signaldata/EventSubscribeReq.hpp> + +inline +LogLevel& +LogLevel::operator=(const EventSubscribeReq& req) +{ + clear(); + for(size_t i = 0; i<req.noOfEntries; i++){ + logLevelData[(req.theData[i] >> 16)] = req.theData[i] & 0xFFFF; + } + return * this; +} #endif diff --git a/ndb/include/kernel/NodeState.hpp b/ndb/include/kernel/NodeState.hpp index 185e3ea8ea4..16784ecde79 100644 --- a/ndb/include/kernel/NodeState.hpp +++ b/ndb/include/kernel/NodeState.hpp @@ -100,7 +100,7 @@ public: /** * Length in 32-bit words */ - static const Uint32 DataLength = 8 + NdbNodeBitmask::Size; + STATIC_CONST( DataLength = 8 + NdbNodeBitmask::Size ); /** * Constructor(s) diff --git a/ndb/include/kernel/ndb_limits.h b/ndb/include/kernel/ndb_limits.h index f35cc617e86..88fcff22da7 100644 --- a/ndb/include/kernel/ndb_limits.h +++ b/ndb/include/kernel/ndb_limits.h @@ -50,7 +50,7 @@ **/ #define MAX_TUPLES_PER_PAGE 8191 #define MAX_TUPLES_BITS 13 /* 13 bits = 8191 tuples per page */ -//#define MAX_NO_OF_TUPLEKEY 16 Not currently used +/*#define MAX_NO_OF_TUPLEKEY 16 Not currently used */ #define MAX_TABLES 1600 #define MAX_TAB_NAME_SIZE 128 #define MAX_ATTR_NAME_SIZE 32 @@ -64,11 +64,32 @@ #define MIN_ATTRBUF ((MAX_ATTRIBUTES_IN_TABLE/24) + 1) /* - * Number of Records to fetch per SCAN_NEXTREQ in a scan in LQH. The + * Max Number of Records to fetch per SCAN_NEXTREQ in a scan in LQH. The * API can order a multiple of this number of records at a time since * fragments can be scanned in parallel. */ -#define MAX_PARALLEL_OP_PER_SCAN 16 +#define MAX_PARALLEL_OP_PER_SCAN 992 +/* +* The default batch size. Configurable parameter. +*/ +#define DEF_BATCH_SIZE 64 +/* +* When calculating the number of records sent from LQH in each batch +* one uses SCAN_BATCH_SIZE divided by the expected size of signals +* per row. This gives the batch size used for the scan. The NDB API +* will receive one batch from each node at a time so there has to be +* some care taken also so that the NDB API is not overloaded with +* signals. +* This parameter is configurable, this is the default value. +*/ +#define SCAN_BATCH_SIZE 32768 +/* +* To protect the NDB API from overload we also define a maximum total +* batch size from all nodes. This parameter should most likely be +* configurable, or dependent on sendBufferSize. +* This parameter is configurable, this is the default value. +*/ +#define MAX_SCAN_BATCH_SIZE 262144 /* * Maximum number of Parallel Scan queries on one hash index fragment */ @@ -87,13 +108,13 @@ /* * Ordered index constants. Make configurable per index later. */ -#define MAX_TTREE_NODE_SIZE 64 // total words in node -#define MAX_TTREE_PREF_SIZE 4 // words in min prefix -#define MAX_TTREE_NODE_SLACK 3 // diff between max and min occupancy +#define MAX_TTREE_NODE_SIZE 64 /* total words in node */ +#define MAX_TTREE_PREF_SIZE 4 /* words in min prefix */ +#define MAX_TTREE_NODE_SLACK 2 /* diff between max and min occupancy */ /* * Blobs. */ -#define NDB_BLOB_HEAD_SIZE 2 // sizeof(NdbBlob::Head) >> 2 +#define NDB_BLOB_HEAD_SIZE 2 /* sizeof(NdbBlob::Head) >> 2 */ #endif diff --git a/ndb/include/kernel/signaldata/ArbitSignalData.hpp b/ndb/include/kernel/signaldata/ArbitSignalData.hpp index 271b9920cd0..f255b8dcbbe 100644 --- a/ndb/include/kernel/signaldata/ArbitSignalData.hpp +++ b/ndb/include/kernel/signaldata/ArbitSignalData.hpp @@ -54,7 +54,7 @@ public: } inline void getText(char *buf, size_t buf_len) const { - snprintf(buf, buf_len, "%08x%08x", data[0], data[1]); + BaseString::snprintf(buf, buf_len, "%08x%08x", data[0], data[1]); } /* inline char* getText() const { @@ -113,19 +113,19 @@ public: static inline void getErrText(Uint32 code, char* buf, size_t buf_len) { switch (code) { case ErrTicket: - snprintf(buf, buf_len, "invalid arbitrator-ticket"); + BaseString::snprintf(buf, buf_len, "invalid arbitrator-ticket"); break; case ErrToomany: - snprintf(buf, buf_len, "too many requests"); + BaseString::snprintf(buf, buf_len, "too many requests"); break; case ErrState: - snprintf(buf, buf_len, "invalid state"); + BaseString::snprintf(buf, buf_len, "invalid state"); break; case ErrTimeout: - snprintf(buf, buf_len, "timeout"); + BaseString::snprintf(buf, buf_len, "timeout"); break; default: - snprintf(buf, buf_len, "unknown error [code=%u]", code); + BaseString::snprintf(buf, buf_len, "unknown error [code=%u]", code); break; } } diff --git a/ndb/include/kernel/signaldata/AttrInfo.hpp b/ndb/include/kernel/signaldata/AttrInfo.hpp index 18bd9b22c40..c87470db8b0 100644 --- a/ndb/include/kernel/signaldata/AttrInfo.hpp +++ b/ndb/include/kernel/signaldata/AttrInfo.hpp @@ -35,7 +35,8 @@ class AttrInfo { */ friend class Dbtc; friend class Dblqh; - + friend class NdbScanOperation; + friend bool printATTRINFO(FILE *, const Uint32 *, Uint32, Uint16); public: diff --git a/ndb/include/kernel/signaldata/CreateTable.hpp b/ndb/include/kernel/signaldata/CreateTable.hpp index 424367f28d5..67e510d2ed0 100644 --- a/ndb/include/kernel/signaldata/CreateTable.hpp +++ b/ndb/include/kernel/signaldata/CreateTable.hpp @@ -89,7 +89,8 @@ public: ArraySizeTooBig = 737, RecordTooBig = 738, InvalidPrimaryKeySize = 739, - NullablePrimaryKey = 740 + NullablePrimaryKey = 740, + InvalidCharset = 743 }; private: diff --git a/ndb/include/kernel/signaldata/DictSchemaInfo.hpp b/ndb/include/kernel/signaldata/DictSchemaInfo.hpp index d7f82abc299..c15dcf2fd7a 100644 --- a/ndb/include/kernel/signaldata/DictSchemaInfo.hpp +++ b/ndb/include/kernel/signaldata/DictSchemaInfo.hpp @@ -26,8 +26,8 @@ class DictSchemaInfo { friend class Dbdict; public: - static const unsigned HeaderLength = 3; - static const unsigned DataLength = 22; + STATIC_CONST( HeaderLength = 3 ); + STATIC_CONST( DataLength = 22 ); private: Uint32 senderRef; diff --git a/ndb/include/kernel/signaldata/DictTabInfo.hpp b/ndb/include/kernel/signaldata/DictTabInfo.hpp index dec7145c897..6b4a3f34553 100644 --- a/ndb/include/kernel/signaldata/DictTabInfo.hpp +++ b/ndb/include/kernel/signaldata/DictTabInfo.hpp @@ -38,7 +38,7 @@ offsetof(x, l) } #define DTIBREAK(x) \ - { DictTabInfo::x, 0, SimpleProperties::InvalidValue, 0, 0 } + { DictTabInfo::x, 0, SimpleProperties::InvalidValue, 0, 0, 0 } class DictTabInfo { /** @@ -221,33 +221,33 @@ public: }; // ScanOptimised constants - static const unsigned updateOptimised = 0; - static const unsigned scanOptimised = 1; + STATIC_CONST( updateOptimised = 0 ); + STATIC_CONST( scanOptimised = 1 ); // AttributeType constants - static const unsigned SignedType = 0; - static const unsigned UnSignedType = 1; - static const unsigned FloatingPointType = 2; - static const unsigned StringType = 3; + STATIC_CONST( SignedType = 0 ); + STATIC_CONST( UnSignedType = 1 ); + STATIC_CONST( FloatingPointType = 2 ); + STATIC_CONST( StringType = 3 ); // AttributeSize constants - static const unsigned an8Bit = 3; - static const unsigned a16Bit = 4; - static const unsigned a32Bit = 5; - static const unsigned a64Bit = 6; - static const unsigned a128Bit = 7; + STATIC_CONST( an8Bit = 3 ); + STATIC_CONST( a16Bit = 4 ); + STATIC_CONST( a32Bit = 5 ); + STATIC_CONST( a64Bit = 6 ); + STATIC_CONST( a128Bit = 7 ); // AttributeDGroup constants - static const unsigned NotDGroup = 0; - static const unsigned DGroup = 1; + STATIC_CONST( NotDGroup = 0 ); + STATIC_CONST( DGroup = 1 ); // AttributeDKey constants - static const unsigned NotDKey = 0; - static const unsigned DKey = 1; + STATIC_CONST( NotDKey = 0 ); + STATIC_CONST( DKey = 1 ); // AttributeStoredInd constants - static const unsigned NotStored = 0; - static const unsigned Stored = 1; + STATIC_CONST( NotStored = 0 ); + STATIC_CONST( Stored = 1 ); // Table data interpretation struct Table { @@ -438,8 +438,8 @@ public: case DictTabInfo::ExtText: AttributeType = DictTabInfo::StringType; AttributeSize = DictTabInfo::an8Bit; - // head + inline part [ attr precision ] - AttributeArraySize = (NDB_BLOB_HEAD_SIZE << 2) + AttributeExtPrecision; + // head + inline part [ attr precision lower half ] + AttributeArraySize = (NDB_BLOB_HEAD_SIZE << 2) + (AttributeExtPrecision & 0xFFFF); return true; }; return false; diff --git a/ndb/include/kernel/signaldata/DihContinueB.hpp b/ndb/include/kernel/signaldata/DihContinueB.hpp index e683b55351c..77ecf360601 100644 --- a/ndb/include/kernel/signaldata/DihContinueB.hpp +++ b/ndb/include/kernel/signaldata/DihContinueB.hpp @@ -24,7 +24,8 @@ class DihContinueB { * Sender(s)/Reciver(s) */ friend class Dbdih; - friend bool printCONTINUEB_DBDIH(FILE * output, const Uint32 * theData, Uint32 len); + friend bool printCONTINUEB_DBDIH(FILE * output, const Uint32 * theData, + Uint32 len, Uint16); private: enum Type { ZPACK_TABLE_INTO_PAGES = 1, diff --git a/ndb/include/kernel/signaldata/DumpStateOrd.hpp b/ndb/include/kernel/signaldata/DumpStateOrd.hpp index 1e349fad55a..7368a0ec40d 100644 --- a/ndb/include/kernel/signaldata/DumpStateOrd.hpp +++ b/ndb/include/kernel/signaldata/DumpStateOrd.hpp @@ -95,6 +95,9 @@ public: TcDumpAllApiConnectRec = 2506, TcSetTransactionTimeout = 2507, TcSetApplTransactionTimeout = 2508, + StartTcTimer = 2509, + StopTcTimer = 2510, + StartPeriodicTcTimer = 2511, CmvmiDumpConnections = 2600, CmvmiDumpLongSignalMemory = 2601, CmvmiSetRestartOnErrorInsert = 2602, diff --git a/ndb/include/kernel/signaldata/EventReport.hpp b/ndb/include/kernel/signaldata/EventReport.hpp index b6106bb0ca4..1ad6e1bf7ac 100644 --- a/ndb/include/kernel/signaldata/EventReport.hpp +++ b/ndb/include/kernel/signaldata/EventReport.hpp @@ -135,12 +135,17 @@ public: //GREP GrepSubscriptionInfo = 52, - GrepSubscriptionAlert = 53 - }; + GrepSubscriptionAlert = 53, + //BACKUP + BackupStarted = 54, + BackupFailedToStart = 55, + BackupCompleted = 56, + BackupAborted = 57 + }; + void setEventType(EventType type); EventType getEventType() const; -private: UintR eventType; // DATA 0 }; diff --git a/ndb/include/kernel/signaldata/EventSubscribeReq.hpp b/ndb/include/kernel/signaldata/EventSubscribeReq.hpp index fd2821ea31d..84a1717b1de 100644 --- a/ndb/include/kernel/signaldata/EventSubscribeReq.hpp +++ b/ndb/include/kernel/signaldata/EventSubscribeReq.hpp @@ -27,7 +27,7 @@ * RECIVER: SimBlockCMCtrBlck */ -class EventSubscribeReq { +struct EventSubscribeReq { /** * Receiver(s) */ @@ -38,9 +38,8 @@ class EventSubscribeReq { */ friend class MgmtSrvr; -public: - STATIC_CONST( SignalLength = 22 ); -private: + STATIC_CONST( SignalLength = 2 + LogLevel::LOGLEVEL_CATEGORIES ); + /** * Note: If you use the same blockRef as you have used earlier, * you update your ongoing subscription @@ -53,8 +52,15 @@ private: */ Uint32 noOfEntries; - Uint32 theCategories[10]; - Uint32 theLevels[10]; + Uint32 theData[LogLevel::LOGLEVEL_CATEGORIES]; + + EventSubscribeReq& operator= (const LogLevel& ll){ + noOfEntries = LogLevel::LOGLEVEL_CATEGORIES; + for(size_t i = 0; i<noOfEntries; i++){ + theData[i] = (i << 16) | ll.getLogLevel((LogLevel::EventCategory)i); + } + return * this; + } }; #endif diff --git a/ndb/include/kernel/signaldata/FsCloseReq.hpp b/ndb/include/kernel/signaldata/FsCloseReq.hpp index 8ff47145f87..c42afa143e6 100644 --- a/ndb/include/kernel/signaldata/FsCloseReq.hpp +++ b/ndb/include/kernel/signaldata/FsCloseReq.hpp @@ -74,7 +74,7 @@ FsCloseReq::getRemoveFileFlag(const UintR & fileflag){ inline void FsCloseReq::setRemoveFileFlag(UintR & fileflag, bool removefile){ - ASSERT_BOOL(removefile, "FsCloseReq::setRemoveFileFlag"); +// ASSERT_BOOL(removefile, "FsCloseReq::setRemoveFileFlag"); if (removefile == true) fileflag = 1; else diff --git a/ndb/include/kernel/signaldata/KeyInfo.hpp b/ndb/include/kernel/signaldata/KeyInfo.hpp index a4c698f89b2..686f3ae053d 100644 --- a/ndb/include/kernel/signaldata/KeyInfo.hpp +++ b/ndb/include/kernel/signaldata/KeyInfo.hpp @@ -26,6 +26,7 @@ class KeyInfo { friend class DbUtil; friend class NdbOperation; friend class NdbScanOperation; + friend class NdbIndexScanOperation; /** * Reciver(s) diff --git a/ndb/include/kernel/signaldata/LqhFrag.hpp b/ndb/include/kernel/signaldata/LqhFrag.hpp index 116e9c01ca0..13dfafcc653 100644 --- a/ndb/include/kernel/signaldata/LqhFrag.hpp +++ b/ndb/include/kernel/signaldata/LqhFrag.hpp @@ -130,7 +130,7 @@ private: Uint32 keyLength; Uint32 nextLCP; Uint32 noOfKeyAttr; - Uint32 noOfNewAttr; + Uint32 noOfNewAttr; // noOfCharsets in upper half Uint32 checksumIndicator; Uint32 noOfAttributeGroups; Uint32 GCPIndicator; diff --git a/ndb/include/kernel/signaldata/NdbfsContinueB.hpp b/ndb/include/kernel/signaldata/NdbfsContinueB.hpp index 2d569be721f..6154e5c19b1 100644 --- a/ndb/include/kernel/signaldata/NdbfsContinueB.hpp +++ b/ndb/include/kernel/signaldata/NdbfsContinueB.hpp @@ -24,7 +24,8 @@ class NdbfsContinueB { * Sender(s)/Reciver(s) */ friend class Ndbfs; - friend bool printCONTINUEB_NDBFS(FILE * output, const Uint32 * theData, Uint32 len); + friend bool printCONTINUEB_NDBFS(FILE * output, const Uint32 * theData, + Uint32 len, Uint16); private: enum { ZSCAN_MEMORYCHANNEL_10MS_DELAY = 0, diff --git a/ndb/include/kernel/signaldata/ScanFrag.hpp b/ndb/include/kernel/signaldata/ScanFrag.hpp index 2b37e544e1f..41ea569c45d 100644 --- a/ndb/include/kernel/signaldata/ScanFrag.hpp +++ b/ndb/include/kernel/signaldata/ScanFrag.hpp @@ -33,21 +33,24 @@ class ScanFragReq { */ friend class Dblqh; public: - STATIC_CONST( SignalLength = 25 ); - + STATIC_CONST( SignalLength = 12 ); + + friend bool printSCAN_FRAGREQ(FILE *, const Uint32*, Uint32, Uint16); + public: Uint32 senderData; Uint32 resultRef; // Where to send the result Uint32 savePointId; Uint32 requestInfo; Uint32 tableId; - Uint32 fragmentNo; + Uint32 fragmentNoKeyLen; Uint32 schemaVersion; Uint32 transId1; Uint32 transId2; - Uint32 clientOpPtr[MAX_PARALLEL_OP_PER_SCAN]; - - static Uint32 getConcurrency(const Uint32 & requestInfo); + Uint32 clientOpPtr; + Uint32 batch_size_rows; + Uint32 batch_size_bytes; + static Uint32 getLockMode(const Uint32 & requestInfo); static Uint32 getHoldLockFlag(const Uint32 & requestInfo); static Uint32 getKeyinfoFlag(const Uint32 & requestInfo); @@ -56,7 +59,6 @@ public: static Uint32 getAttrLen(const Uint32 & requestInfo); static Uint32 getScanPrio(const Uint32 & requestInfo); - static void setConcurrency(Uint32 & requestInfo, Uint32 concurrency); static void setLockMode(Uint32 & requestInfo, Uint32 lockMode); static void setHoldLockFlag(Uint32 & requestInfo, Uint32 holdLock); static void setKeyinfoFlag(Uint32 & requestInfo, Uint32 keyinfo); @@ -79,7 +81,6 @@ class KeyInfo20 { friend class NdbOperation; friend class NdbScanReceiver; public: - //STATIC_CONST( SignalLength = 21 ); STATIC_CONST( HeaderLength = 5); STATIC_CONST( DataLength = 20 ); @@ -110,15 +111,15 @@ class ScanFragConf { friend class Backup; friend class Suma; public: - STATIC_CONST( SignalLength = 21 ); + STATIC_CONST( SignalLength = 6 ); public: Uint32 senderData; Uint32 completedOps; Uint32 fragmentCompleted; - Uint32 opReturnDataLen[16]; Uint32 transId1; Uint32 transId2; + Uint32 total_len; }; class ScanFragRef { @@ -143,6 +144,7 @@ public: ZSCAN_NO_FRAGMENT_ERROR = 487, ZTOO_MANY_ACTIVE_SCAN_ERROR = 488, ZNO_FREE_SCANREC_ERROR = 489, + ZWRONG_BATCH_SIZE = 1230, ZSTANDBY_SCAN_ERROR = 1209, ZSCAN_BOOK_ACC_OP_ERROR = 1219, ZUNKNOWN_TRANS_ERROR = 1227 @@ -175,20 +177,21 @@ class ScanFragNextReq { friend bool printSCANFRAGNEXTREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo); public: - STATIC_CONST( SignalLength = 4 ); + STATIC_CONST( SignalLength = 6 ); public: Uint32 senderData; Uint32 closeFlag; Uint32 transId1; Uint32 transId2; + Uint32 batch_size_rows; + Uint32 batch_size_bytes; }; /** * Request Info * * a = Length of attrinfo - 16 Bits (16-31) - * c = Concurrency - 5 Bits (0-4) -> Max 31 * l = Lock Mode - 1 Bit 5 * h = Hold lock - 1 Bit 7 * k = Keyinfo - 1 Bit 8 @@ -198,11 +201,8 @@ public: * * 1111111111222222222233 * 01234567890123456789012345678901 - * ccccclxhkr ppppaaaaaaaaaaaaaaaa + * lxhkr ppppaaaaaaaaaaaaaaaa */ -#define SF_CONCURRENCY_SHIFT (0) -#define SF_CONCURRENCY_MASK (31) - #define SF_LOCK_MODE_SHIFT (5) #define SF_LOCK_MODE_MASK (1) @@ -219,12 +219,6 @@ public: inline Uint32 -ScanFragReq::getConcurrency(const Uint32 & requestInfo){ - return (requestInfo >> SF_CONCURRENCY_SHIFT) & SF_CONCURRENCY_MASK; -} - -inline -Uint32 ScanFragReq::getLockMode(const Uint32 & requestInfo){ return (requestInfo >> SF_LOCK_MODE_SHIFT) & SF_LOCK_MODE_MASK; } @@ -274,13 +268,6 @@ ScanFragReq::setScanPrio(UintR & requestInfo, UintR val){ inline void -ScanFragReq::setConcurrency(UintR & requestInfo, UintR val){ - ASSERT_MAX(val, SF_CONCURRENCY_MASK, "ScanFragReq::setConcurrency"); - requestInfo |= (val << SF_CONCURRENCY_SHIFT); -} - -inline -void ScanFragReq::setLockMode(UintR & requestInfo, UintR val){ ASSERT_MAX(val, SF_LOCK_MODE_MASK, "ScanFragReq::setLockMode"); requestInfo |= (val << SF_LOCK_MODE_SHIFT); @@ -324,7 +311,7 @@ ScanFragReq::setAttrLen(UintR & requestInfo, UintR val){ inline Uint32 KeyInfo20::setScanInfo(Uint32 opNo, Uint32 scanNo){ - ASSERT_MAX(opNo, 15, "KeyInfo20::setScanInfo"); + ASSERT_MAX(opNo, 1023, "KeyInfo20::setScanInfo"); ASSERT_MAX(scanNo, 255, "KeyInfo20::setScanInfo"); return (opNo << 8) + scanNo; } @@ -338,7 +325,7 @@ KeyInfo20::getScanNo(Uint32 scanInfo){ inline Uint32 KeyInfo20::getScanOp(Uint32 scanInfo){ - return (scanInfo >> 8) & 0xF; + return (scanInfo >> 8) & 0x3FF; } #endif diff --git a/ndb/include/kernel/signaldata/ScanTab.hpp b/ndb/include/kernel/signaldata/ScanTab.hpp index ab2978e48da..2029b16197e 100644 --- a/ndb/include/kernel/signaldata/ScanTab.hpp +++ b/ndb/include/kernel/signaldata/ScanTab.hpp @@ -45,7 +45,7 @@ public: /** * Length of signal */ - STATIC_CONST( SignalLength = 25 ); + STATIC_CONST( StaticLength = 11 ); private: @@ -55,7 +55,7 @@ private: * DATA VARIABLES */ UintR apiConnectPtr; // DATA 0 - UintR attrLen; // DATA 1 + UintR attrLenKeyLen; // DATA 1 UintR requestInfo; // DATA 2 UintR tableId; // DATA 3 UintR tableSchemaVersion; // DATA 4 @@ -63,7 +63,8 @@ private: UintR transId1; // DATA 6 UintR transId2; // DATA 7 UintR buddyConPtr; // DATA 8 - UintR apiOperationPtr[16]; // DATA 9-25 + UintR batch_byte_size; // DATA 9 + UintR first_batch_size; // DATA 10 /** * Get:ers for requestInfo @@ -73,7 +74,8 @@ private: static Uint8 getHoldLockFlag(const UintR & requestInfo); static Uint8 getReadCommittedFlag(const UintR & requestInfo); static Uint8 getRangeScanFlag(const UintR & requestInfo); - static Uint8 getScanBatch(const UintR & requestInfo); + static Uint8 getKeyinfoFlag(const UintR & requestInfo); + static Uint16 getScanBatch(const UintR & requestInfo); /** * Set:ers for requestInfo @@ -84,6 +86,7 @@ private: static void setHoldLockFlag(UintR & requestInfo, Uint32 flag); static void setReadCommittedFlag(UintR & requestInfo, Uint32 flag); static void setRangeScanFlag(UintR & requestInfo, Uint32 flag); + static void setKeyinfoFlag(UintR & requestInfo, Uint32 flag); static void setScanBatch(Uint32& requestInfo, Uint32 sz); }; @@ -94,12 +97,13 @@ private: l = Lock mode - 1 Bit 8 h = Hold lock mode - 1 Bit 10 c = Read Committed - 1 Bit 11 + k = Keyinfo - 1 Bit 12 x = Range Scan (TUX) - 1 Bit 15 - b = Scan batch - 5 Bit 16-19 (max 15) + b = Scan batch - 10 Bit 16-25 (max 1023) 1111111111222222222233 01234567890123456789012345678901 - ppppppppl hc xbbbbb + ppppppppl hck xbbbbbbbbbb */ #define PARALLELL_SHIFT (0) @@ -111,6 +115,9 @@ private: #define HOLD_LOCK_SHIFT (10) #define HOLD_LOCK_MASK (1) +#define KEYINFO_SHIFT (12) +#define KEYINFO_MASK (1) + #define READ_COMMITTED_SHIFT (11) #define READ_COMMITTED_MASK (1) @@ -118,7 +125,7 @@ private: #define RANGE_SCAN_MASK (1) #define SCAN_BATCH_SHIFT (16) -#define SCAN_BATCH_MASK (31) +#define SCAN_BATCH_MASK (1023) inline Uint8 @@ -151,9 +158,9 @@ ScanTabReq::getRangeScanFlag(const UintR & requestInfo){ } inline -Uint8 +Uint16 ScanTabReq::getScanBatch(const Uint32 & requestInfo){ - return (Uint8)((requestInfo >> SCAN_BATCH_SHIFT) & SCAN_BATCH_MASK); + return (Uint16)((requestInfo >> SCAN_BATCH_SHIFT) & SCAN_BATCH_MASK); } inline @@ -201,9 +208,24 @@ inline void ScanTabReq::setScanBatch(Uint32 & requestInfo, Uint32 flag){ ASSERT_MAX(flag, SCAN_BATCH_MASK, "ScanTabReq::setScanBatch"); + requestInfo &= ~(SCAN_BATCH_MASK << SCAN_BATCH_SHIFT); requestInfo |= (flag << SCAN_BATCH_SHIFT); } +inline +Uint8 +ScanTabReq::getKeyinfoFlag(const UintR & requestInfo){ + return (Uint8)((requestInfo >> KEYINFO_SHIFT) & KEYINFO_MASK); +} + +inline +void +ScanTabReq::setKeyinfoFlag(UintR & requestInfo, Uint32 flag){ + ASSERT_BOOL(flag, "ScanTabReq::setKeyinfoFlag"); + requestInfo |= (flag << KEYINFO_SHIFT); +} + + /** * * SENDER: Dbtc @@ -230,7 +252,7 @@ public: * Length of signal */ STATIC_CONST( SignalLength = 4 ); - static const Uint32 EndOfData = (1 << 31); + STATIC_CONST( EndOfData = (1 << 31) ); private: @@ -250,8 +272,8 @@ private: Uint32 info; }; - static Uint32 getLength(Uint32 opDataInfo) { return opDataInfo >> 5; }; - static Uint32 getRows(Uint32 opDataInfo) { return opDataInfo & 31;} + static Uint32 getLength(Uint32 opDataInfo) { return opDataInfo >> 10; }; + static Uint32 getRows(Uint32 opDataInfo) { return opDataInfo & 1023;} }; /** diff --git a/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp b/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp index c3be808cc41..2923029f8f6 100644 --- a/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp +++ b/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp @@ -18,6 +18,7 @@ #define SET_LOGLEVEL_ORD_HPP #include <LogLevel.hpp> +#include "EventSubscribeReq.hpp" #include "SignalData.hpp" /** @@ -39,11 +40,10 @@ class SetLogLevelOrd { friend class NodeLogLevel; private: - STATIC_CONST( SignalLength = 25 ); - + STATIC_CONST( SignalLength = 1 + LogLevel::LOGLEVEL_CATEGORIES ); + Uint32 noOfEntries; - Uint32 theCategories[12]; - Uint32 theLevels[12]; + Uint32 theData[LogLevel::LOGLEVEL_CATEGORIES]; void clear(); @@ -51,6 +51,22 @@ private: * Note level is valid as 0-15 */ void setLogLevel(LogLevel::EventCategory ec, int level = 7); + + SetLogLevelOrd& operator= (const LogLevel& ll){ + noOfEntries = LogLevel::LOGLEVEL_CATEGORIES; + for(size_t i = 0; i<noOfEntries; i++){ + theData[i] = (i << 16) | ll.getLogLevel((LogLevel::EventCategory)i); + } + return * this; + } + + SetLogLevelOrd& operator= (const EventSubscribeReq& ll){ + noOfEntries = ll.noOfEntries; + for(size_t i = 0; i<noOfEntries; i++){ + theData[i] = ll.theData[i]; + } + return * this; + } }; inline @@ -62,9 +78,7 @@ SetLogLevelOrd::clear(){ inline void SetLogLevelOrd::setLogLevel(LogLevel::EventCategory ec, int level){ - assert(noOfEntries < 12); - theCategories[noOfEntries] = ec; - theLevels[noOfEntries] = level; + theData[noOfEntries] = (ec << 16) | level; noOfEntries++; } diff --git a/ndb/include/kernel/signaldata/SignalData.hpp b/ndb/include/kernel/signaldata/SignalData.hpp index 6e5748217b2..f9d3a6faa64 100644 --- a/ndb/include/kernel/signaldata/SignalData.hpp +++ b/ndb/include/kernel/signaldata/SignalData.hpp @@ -20,6 +20,7 @@ #include <ndb_global.h> #include <ndb_limits.h> #include <kernel_types.h> +#include <BaseString.hpp> #define ASSERT_BOOL(flag, message) assert(flag<=1) #define ASSERT_RANGE(value, min, max, message) \ @@ -50,4 +51,169 @@ Uint32 getTCErrorCode() { return TCErrorCode; }; \ void setTCErrorCode(Uint32 _s) { TCErrorCode = _s; }; +#define GSN_PRINT_SIGNATURE(f) bool f(FILE *, const Uint32 *, Uint32, Uint16) + +GSN_PRINT_SIGNATURE(printTCKEYREQ); +GSN_PRINT_SIGNATURE(printTCKEYCONF); +GSN_PRINT_SIGNATURE(printTCKEYREF); +GSN_PRINT_SIGNATURE(printLQHKEYREQ); +GSN_PRINT_SIGNATURE(printLQHKEYCONF); +GSN_PRINT_SIGNATURE(printLQHKEYREF); +GSN_PRINT_SIGNATURE(printTUPKEYREQ); +GSN_PRINT_SIGNATURE(printTUPKEYCONF); +GSN_PRINT_SIGNATURE(printTUPKEYREF); +GSN_PRINT_SIGNATURE(printTUPCOMMITREQ); +GSN_PRINT_SIGNATURE(printCONTINUEB); +GSN_PRINT_SIGNATURE(printFSOPENREQ); +GSN_PRINT_SIGNATURE(printFSCLOSEREQ); +GSN_PRINT_SIGNATURE(printFSREADWRITEREQ); +GSN_PRINT_SIGNATURE(printFSREADWRITEREQ); +GSN_PRINT_SIGNATURE(printFSREF); +GSN_PRINT_SIGNATURE(printFSREF); +GSN_PRINT_SIGNATURE(printFSREF); +GSN_PRINT_SIGNATURE(printFSREF); +GSN_PRINT_SIGNATURE(printFSREF); +GSN_PRINT_SIGNATURE(printFSCONF); +GSN_PRINT_SIGNATURE(printFSCONF); +GSN_PRINT_SIGNATURE(printFSCONF); +GSN_PRINT_SIGNATURE(printFSCONF); +GSN_PRINT_SIGNATURE(printFSCONF); +GSN_PRINT_SIGNATURE(printCLOSECOMREQCONF); +GSN_PRINT_SIGNATURE(printCLOSECOMREQCONF); +GSN_PRINT_SIGNATURE(printPACKED_SIGNAL); +GSN_PRINT_SIGNATURE(printPREPFAILREQREF); +GSN_PRINT_SIGNATURE(printPREPFAILREQREF); +GSN_PRINT_SIGNATURE(printALTER_TABLE_REQ); +GSN_PRINT_SIGNATURE(printALTER_TABLE_CONF); +GSN_PRINT_SIGNATURE(printALTER_TABLE_REF); +GSN_PRINT_SIGNATURE(printALTER_TAB_REQ); +GSN_PRINT_SIGNATURE(printALTER_TAB_CONF); +GSN_PRINT_SIGNATURE(printALTER_TAB_REF); +GSN_PRINT_SIGNATURE(printCREATE_TRIG_REQ); +GSN_PRINT_SIGNATURE(printCREATE_TRIG_CONF); +GSN_PRINT_SIGNATURE(printCREATE_TRIG_REF); +GSN_PRINT_SIGNATURE(printALTER_TRIG_REQ); +GSN_PRINT_SIGNATURE(printALTER_TRIG_CONF); +GSN_PRINT_SIGNATURE(printALTER_TRIG_REF); +GSN_PRINT_SIGNATURE(printDROP_TRIG_REQ); +GSN_PRINT_SIGNATURE(printDROP_TRIG_CONF); +GSN_PRINT_SIGNATURE(printDROP_TRIG_REF); +GSN_PRINT_SIGNATURE(printFIRE_TRIG_ORD); +GSN_PRINT_SIGNATURE(printTRIG_ATTRINFO); +GSN_PRINT_SIGNATURE(printCREATE_INDX_REQ); +GSN_PRINT_SIGNATURE(printCREATE_INDX_CONF); +GSN_PRINT_SIGNATURE(printCREATE_INDX_REF); +GSN_PRINT_SIGNATURE(printDROP_INDX_REQ); +GSN_PRINT_SIGNATURE(printDROP_INDX_CONF); +GSN_PRINT_SIGNATURE(printDROP_INDX_REF); +GSN_PRINT_SIGNATURE(printALTER_INDX_REQ); +GSN_PRINT_SIGNATURE(printALTER_INDX_CONF); +GSN_PRINT_SIGNATURE(printALTER_INDX_REF); +GSN_PRINT_SIGNATURE(printTCINDXREQ); +GSN_PRINT_SIGNATURE(printTCINDXCONF); +GSN_PRINT_SIGNATURE(printTCINDXREF); +GSN_PRINT_SIGNATURE(printINDXKEYINFO); +GSN_PRINT_SIGNATURE(printINDXATTRINFO); +GSN_PRINT_SIGNATURE(printFSAPPENDREQ); +GSN_PRINT_SIGNATURE(printBACKUP_REQ); +GSN_PRINT_SIGNATURE(printBACKUP_DATA); +GSN_PRINT_SIGNATURE(printBACKUP_REF); +GSN_PRINT_SIGNATURE(printBACKUP_CONF); +GSN_PRINT_SIGNATURE(printABORT_BACKUP_ORD); +GSN_PRINT_SIGNATURE(printBACKUP_ABORT_REP); +GSN_PRINT_SIGNATURE(printBACKUP_COMPLETE_REP); +GSN_PRINT_SIGNATURE(printBACKUP_NF_COMPLETE_REP); +GSN_PRINT_SIGNATURE(printDEFINE_BACKUP_REQ); +GSN_PRINT_SIGNATURE(printDEFINE_BACKUP_REF); +GSN_PRINT_SIGNATURE(printDEFINE_BACKUP_CONF); +GSN_PRINT_SIGNATURE(printSTART_BACKUP_REQ); +GSN_PRINT_SIGNATURE(printSTART_BACKUP_REF); +GSN_PRINT_SIGNATURE(printSTART_BACKUP_CONF); +GSN_PRINT_SIGNATURE(printBACKUP_FRAGMENT_REQ); +GSN_PRINT_SIGNATURE(printBACKUP_FRAGMENT_REF); +GSN_PRINT_SIGNATURE(printBACKUP_FRAGMENT_CONF); +GSN_PRINT_SIGNATURE(printSTOP_BACKUP_REQ); +GSN_PRINT_SIGNATURE(printSTOP_BACKUP_REF); +GSN_PRINT_SIGNATURE(printSTOP_BACKUP_CONF); +GSN_PRINT_SIGNATURE(printBACKUP_STATUS_REQ); +GSN_PRINT_SIGNATURE(printBACKUP_STATUS_CONF); +GSN_PRINT_SIGNATURE(printUTIL_SEQUENCE_REQ); +GSN_PRINT_SIGNATURE(printUTIL_SEQUENCE_REF); +GSN_PRINT_SIGNATURE(printUTIL_SEQUENCE_CONF); +GSN_PRINT_SIGNATURE(printUTIL_PREPARE_REQ); +GSN_PRINT_SIGNATURE(printUTIL_PREPARE_REF); +GSN_PRINT_SIGNATURE(printUTIL_PREPARE_CONF); +GSN_PRINT_SIGNATURE(printUTIL_EXECUTE_REQ); +GSN_PRINT_SIGNATURE(printUTIL_EXECUTE_REF); +GSN_PRINT_SIGNATURE(printUTIL_EXECUTE_CONF); +GSN_PRINT_SIGNATURE(printSCANTABREQ); +GSN_PRINT_SIGNATURE(printSCANTABCONF); +GSN_PRINT_SIGNATURE(printSCANTABREF); +GSN_PRINT_SIGNATURE(printSCANNEXTREQ); +GSN_PRINT_SIGNATURE(printLQH_FRAG_REQ); +GSN_PRINT_SIGNATURE(printLQH_FRAG_REF); +GSN_PRINT_SIGNATURE(printLQH_FRAG_CONF); +GSN_PRINT_SIGNATURE(printPREP_DROP_TAB_REQ); +GSN_PRINT_SIGNATURE(printPREP_DROP_TAB_REF); +GSN_PRINT_SIGNATURE(printPREP_DROP_TAB_CONF); +GSN_PRINT_SIGNATURE(printDROP_TAB_REQ); +GSN_PRINT_SIGNATURE(printDROP_TAB_REF); +GSN_PRINT_SIGNATURE(printDROP_TAB_CONF); +GSN_PRINT_SIGNATURE(printLCP_FRAG_ORD); +GSN_PRINT_SIGNATURE(printLCP_FRAG_REP); +GSN_PRINT_SIGNATURE(printLCP_COMPLETE_REP); +GSN_PRINT_SIGNATURE(printSTART_LCP_REQ); +GSN_PRINT_SIGNATURE(printSTART_LCP_CONF); +GSN_PRINT_SIGNATURE(printMASTER_LCP_REQ); +GSN_PRINT_SIGNATURE(printMASTER_LCP_REF); +GSN_PRINT_SIGNATURE(printMASTER_LCP_CONF); +GSN_PRINT_SIGNATURE(printCOPY_GCI_REQ); +GSN_PRINT_SIGNATURE(printSYSTEM_ERROR); +GSN_PRINT_SIGNATURE(printSTART_REC_REQ); +GSN_PRINT_SIGNATURE(printSTART_REC_CONF); +GSN_PRINT_SIGNATURE(printNF_COMPLETE_REP); +GSN_PRINT_SIGNATURE(printSIGNAL_DROPPED_REP); +GSN_PRINT_SIGNATURE(printFAIL_REP); +GSN_PRINT_SIGNATURE(printDISCONNECT_REP); +GSN_PRINT_SIGNATURE(printSUB_CREATE_REQ); +GSN_PRINT_SIGNATURE(printSUB_CREATE_CONF); +GSN_PRINT_SIGNATURE(printSUB_START_REQ); +GSN_PRINT_SIGNATURE(printSUB_START_REF); +GSN_PRINT_SIGNATURE(printSUB_START_CONF); +GSN_PRINT_SIGNATURE(printSUB_SYNC_REQ); +GSN_PRINT_SIGNATURE(printSUB_SYNC_REF); +GSN_PRINT_SIGNATURE(printSUB_SYNC_CONF); +GSN_PRINT_SIGNATURE(printSUB_META_DATA); +GSN_PRINT_SIGNATURE(printSUB_TABLE_DATA); +GSN_PRINT_SIGNATURE(printSUB_SYNC_CONTINUE_REQ); +GSN_PRINT_SIGNATURE(printSUB_SYNC_CONTINUE_REF); +GSN_PRINT_SIGNATURE(printSUB_SYNC_CONTINUE_CONF); +GSN_PRINT_SIGNATURE(printSUB_GCP_COMPLETE_REP); +GSN_PRINT_SIGNATURE(printCREATE_FRAGMENTATION_REQ); +GSN_PRINT_SIGNATURE(printCREATE_FRAGMENTATION_REF); +GSN_PRINT_SIGNATURE(printCREATE_FRAGMENTATION_CONF); +GSN_PRINT_SIGNATURE(printUTIL_CREATE_LOCK_REQ); +GSN_PRINT_SIGNATURE(printUTIL_CREATE_LOCK_REF); +GSN_PRINT_SIGNATURE(printUTIL_CREATE_LOCK_CONF); +GSN_PRINT_SIGNATURE(printUTIL_DESTROY_LOCK_REQ); +GSN_PRINT_SIGNATURE(printUTIL_DESTROY_LOCK_REF); +GSN_PRINT_SIGNATURE(printUTIL_DESTROY_LOCK_CONF); +GSN_PRINT_SIGNATURE(printUTIL_LOCK_REQ); +GSN_PRINT_SIGNATURE(printUTIL_LOCK_REF); +GSN_PRINT_SIGNATURE(printUTIL_LOCK_CONF); +GSN_PRINT_SIGNATURE(printUTIL_UNLOCK_REQ); +GSN_PRINT_SIGNATURE(printUTIL_UNLOCK_REF); +GSN_PRINT_SIGNATURE(printUTIL_UNLOCK_CONF); +GSN_PRINT_SIGNATURE(printCNTR_START_REQ); +GSN_PRINT_SIGNATURE(printCNTR_START_REF); +GSN_PRINT_SIGNATURE(printCNTR_START_CONF); +GSN_PRINT_SIGNATURE(printREAD_NODES_CONF); +GSN_PRINT_SIGNATURE(printTUX_MAINT_REQ); +GSN_PRINT_SIGNATURE(printACC_LOCKREQ); +GSN_PRINT_SIGNATURE(printLQH_TRANSCONF); +GSN_PRINT_SIGNATURE(printSCAN_FRAGREQ); + +GSN_PRINT_SIGNATURE(printCONTINUEB_NDBFS); +GSN_PRINT_SIGNATURE(printCONTINUEB_DBDIH); + #endif diff --git a/ndb/include/kernel/signaldata/TcContinueB.hpp b/ndb/include/kernel/signaldata/TcContinueB.hpp index 7a093b457e8..85213791b2a 100644 --- a/ndb/include/kernel/signaldata/TcContinueB.hpp +++ b/ndb/include/kernel/signaldata/TcContinueB.hpp @@ -42,7 +42,9 @@ private: ZWAIT_ABORT_ALL = 14, ZCHECK_SCAN_ACTIVE_FAILED_LQH = 15, CHECK_WAIT_DROP_TAB_FAILED_LQH = 16, - TRIGGER_PENDING = 17 + TRIGGER_PENDING = 17, + + DelayTCKEYCONF = 18 }; }; diff --git a/ndb/include/kernel/signaldata/TcKeyConf.hpp b/ndb/include/kernel/signaldata/TcKeyConf.hpp index 27ff344f793..277872b990b 100644 --- a/ndb/include/kernel/signaldata/TcKeyConf.hpp +++ b/ndb/include/kernel/signaldata/TcKeyConf.hpp @@ -47,7 +47,8 @@ public: */ STATIC_CONST( StaticLength = 5 ); STATIC_CONST( OperationLength = 2 ); - + STATIC_CONST( SimpleReadBit = (((Uint32)1) << 31) ); + private: /** diff --git a/ndb/include/kernel/signaldata/TcKeyReq.hpp b/ndb/include/kernel/signaldata/TcKeyReq.hpp index f7d3c2e3282..9e42f2a70d5 100644 --- a/ndb/include/kernel/signaldata/TcKeyReq.hpp +++ b/ndb/include/kernel/signaldata/TcKeyReq.hpp @@ -143,7 +143,7 @@ private: */ static Uint8 getTakeOverScanFlag(const UintR & scanInfo); static Uint16 getTakeOverScanNode(const UintR & scanInfo); - static Uint16 getTakeOverScanInfo(const UintR & scanInfo); + static Uint32 getTakeOverScanInfo(const UintR & scanInfo); /** @@ -172,7 +172,7 @@ private: */ static void setTakeOverScanFlag(UintR & scanInfo, Uint8 flag); static void setTakeOverScanNode(UintR & scanInfo, Uint16 node); - static void setTakeOverScanInfo(UintR & scanInfo, Uint16 aScanInfo); + static void setTakeOverScanInfo(UintR & scanInfo, Uint32 aScanInfo); }; /** @@ -228,21 +228,21 @@ private: * Scan Info * t = Scan take over indicator - 1 Bit - n = Take over node - 16 Bits -> max 65535 - p = Scan Info - 12 Bits -> max 4095 + n = Take over node - 12 Bits -> max 65535 + p = Scan Info - 18 Bits -> max 4095 1111111111222222222233 01234567890123456789012345678901 - tpppppppppppp nnnnnnnnnnnnnnnn + tpppppppppppppppppp nnnnnnnnnnnn */ #define TAKE_OVER_SHIFT (0) -#define TAKE_OVER_NODE_SHIFT (16) -#define TAKE_OVER_NODE_MASK (65535) +#define TAKE_OVER_NODE_SHIFT (20) +#define TAKE_OVER_NODE_MASK (4095) #define SCAN_INFO_SHIFT (1) -#define SCAN_INFO_MASK (4095) +#define SCAN_INFO_MASK (262143) /** * Attr Len @@ -490,9 +490,9 @@ TcKeyReq::getTakeOverScanNode(const UintR & scanInfo){ } inline -Uint16 +Uint32 TcKeyReq::getTakeOverScanInfo(const UintR & scanInfo){ - return (Uint16)((scanInfo >> SCAN_INFO_SHIFT) & SCAN_INFO_MASK); + return (Uint32)((scanInfo >> SCAN_INFO_SHIFT) & SCAN_INFO_MASK); } @@ -512,7 +512,7 @@ TcKeyReq::setTakeOverScanNode(UintR & scanInfo, Uint16 node){ inline void -TcKeyReq::setTakeOverScanInfo(UintR & scanInfo, Uint16 aScanInfo){ +TcKeyReq::setTakeOverScanInfo(UintR & scanInfo, Uint32 aScanInfo){ // ASSERT_MAX(aScanInfo, SCAN_INFO_MASK, "TcKeyReq::setTakeOverScanInfo"); scanInfo |= (aScanInfo << SCAN_INFO_SHIFT); } diff --git a/ndb/include/kernel/signaldata/TupFrag.hpp b/ndb/include/kernel/signaldata/TupFrag.hpp index fc88dacd48f..c1e861c5dff 100644 --- a/ndb/include/kernel/signaldata/TupFrag.hpp +++ b/ndb/include/kernel/signaldata/TupFrag.hpp @@ -105,8 +105,6 @@ public: enum ErrorCode { NoError = 0, InvalidRequest = 800, - NoFreeFragmentOper = 830, - NoFreeIndexFragment = 852, NoFreeFragment = 604, NoFreeAttributes = 827 }; @@ -121,12 +119,13 @@ class TupAddAttrReq { friend class Dblqh; friend class Dbtux; public: - STATIC_CONST( SignalLength = 4 ); + STATIC_CONST( SignalLength = 5 ); private: Uint32 tupConnectPtr; Uint32 notused1; Uint32 attrId; Uint32 attrDescriptor; + Uint32 extTypeInfo; }; class TupAddAttrConf { @@ -143,6 +142,10 @@ class TupAddAttrRef { friend class Dbtup; public: STATIC_CONST( SignalLength = 2 ); + enum ErrorCode { + NoError = 0, + InvalidCharset = 743 + }; private: Uint32 userPtr; Uint32 errorCode; @@ -180,7 +183,8 @@ public: STATIC_CONST( SignalLength = 2 ); enum ErrorCode { NoError = 0, - InvalidAttributeType = 831, + InvalidAttributeType = 742, + InvalidCharset = 743, InvalidNodeSize = 832 }; private: diff --git a/ndb/include/kernel/signaldata/TupKey.hpp b/ndb/include/kernel/signaldata/TupKey.hpp index 304bebbec88..ffd57d81e64 100644 --- a/ndb/include/kernel/signaldata/TupKey.hpp +++ b/ndb/include/kernel/signaldata/TupKey.hpp @@ -80,7 +80,7 @@ class TupKeyConf { friend bool printTUPKEYCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo); public: - STATIC_CONST( SignalLength = 6 ); + STATIC_CONST( SignalLength = 5 ); private: @@ -88,11 +88,10 @@ private: * DATA VARIABLES */ Uint32 userPtr; - Uint32 pageId; - Uint32 pageIndex; Uint32 readLength; Uint32 writeLength; Uint32 noFiredTriggers; + Uint32 lastRow; }; class TupKeyRef { diff --git a/ndb/include/kernel/signaldata/TuxBound.hpp b/ndb/include/kernel/signaldata/TuxBound.hpp index 1f256150573..87ce3c3c098 100644 --- a/ndb/include/kernel/signaldata/TuxBound.hpp +++ b/ndb/include/kernel/signaldata/TuxBound.hpp @@ -48,7 +48,6 @@ private: Uint32 tuxScanPtrI; /* * Number of words of bound info included after fixed signal data. - * Starts with 5 unused words (word 0 is length used by LQH). */ Uint32 boundAiLength; }; diff --git a/ndb/include/kernel/signaldata/UpgradeStartup.hpp b/ndb/include/kernel/signaldata/UpgradeStartup.hpp index badc7ca0e4d..93fef323789 100644 --- a/ndb/include/kernel/signaldata/UpgradeStartup.hpp +++ b/ndb/include/kernel/signaldata/UpgradeStartup.hpp @@ -1,14 +1,16 @@ #ifndef NDB_UPGRADE_STARTUP #define NDB_UPGRADE_STARTUP +class Ndbcntr; + struct UpgradeStartup { static void installEXEC(SimulatedBlock*); - static const Uint32 GSN_CM_APPCHG = 131; - static const Uint32 GSN_CNTR_MASTERCONF = 148; - static const Uint32 GSN_CNTR_MASTERREF = 149; - static const Uint32 GSN_CNTR_MASTERREQ = 150; + STATIC_CONST( GSN_CM_APPCHG = 131 ); + STATIC_CONST( GSN_CNTR_MASTERCONF = 148 ); + STATIC_CONST( GSN_CNTR_MASTERREF = 149 ); + STATIC_CONST( GSN_CNTR_MASTERREQ = 150 ); static void sendCmAppChg(Ndbcntr&, Signal *, Uint32 startLevel); static void execCM_APPCHG(SimulatedBlock& block, Signal*); diff --git a/ndb/include/kernel/trigger_definitions.h b/ndb/include/kernel/trigger_definitions.h index 439d65c6c30..7ce74877de4 100644 --- a/ndb/include/kernel/trigger_definitions.h +++ b/ndb/include/kernel/trigger_definitions.h @@ -47,11 +47,11 @@ struct TriggerType { struct TriggerActionTime { enum Value { - TA_BEFORE = 0, // Immediate, before operation - TA_AFTER = 1, // Immediate, after operation - TA_DEFERRED = 2, // Before commit - TA_DETACHED = 3, // After commit in a separate transaction, NYI - TA_CUSTOM = 4 // Hardcoded per TriggerType + TA_BEFORE = 0, /* Immediate, before operation */ + TA_AFTER = 1, /* Immediate, after operation */ + TA_DEFERRED = 2, /* Before commit */ + TA_DETACHED = 3, /* After commit in a separate transaction, NYI */ + TA_CUSTOM = 4 /* Hardcoded per TriggerType */ }; }; @@ -60,7 +60,7 @@ struct TriggerEvent { TE_INSERT = 0, TE_DELETE = 1, TE_UPDATE = 2, - TE_CUSTOM = 3 // Hardcoded per TriggerType + TE_CUSTOM = 3 /* Hardcoded per TriggerType */ }; }; |