From: Frazer Clement Date: April 14 2011 10:27am Subject: bzr push into mysql-5.1-telco-7.1 branch (frazer.clement:4164 to 4165) List-Archive: http://lists.mysql.com/commits/135423 Message-Id: <201104141027.p3EARJ6v026673@acsmt357.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 4165 Frazer Clement 2011-04-14 [merge] Merge 7.0->7.1 modified: storage/ndb/include/kernel/ndb_limits.h storage/ndb/include/ndbapi/Ndb.hpp storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp storage/ndb/src/ndbapi/Ndb.cpp storage/ndb/src/ndbapi/NdbImpl.hpp storage/ndb/src/ndbapi/Ndbinit.cpp storage/ndb/test/include/NDBT_Tables.hpp storage/ndb/test/src/NDBT_Tables.cpp 4164 Maitrayi Sabaratnam 2011-04-12 Bug 12330248: Change mysql_system_tables.sql to handle generation modified: scripts/mysql_system_tables.sql === modified file 'storage/ndb/include/kernel/ndb_limits.h' --- a/storage/ndb/include/kernel/ndb_limits.h 2011-04-11 13:36:12 +0000 +++ b/storage/ndb/include/kernel/ndb_limits.h 2011-04-13 08:51:04 +0000 @@ -82,7 +82,7 @@ * When sending a SUB_TABLE_DATA from SUMA to API * */ -#define MAX_SUMA_MESSAGE_IN_WORDS 8000 +#define MAX_SUMA_MESSAGE_IN_WORDS 8028 /** * When sending a SUB_TABLE_DATA === modified file 'storage/ndb/include/ndbapi/Ndb.hpp' --- a/storage/ndb/include/ndbapi/Ndb.hpp 2011-02-09 14:18:53 +0000 +++ b/storage/ndb/include/ndbapi/Ndb.hpp 2011-04-13 19:33:59 +0000 @@ -1757,6 +1757,10 @@ public: /* Get minimum known DB node version */ Uint32 getMinDbNodeVersion() const; + /* Get/Set per-Ndb custom data pointer */ + void setCustomData(void*); + void* getCustomData() const; + /* Some client behaviour counters to assist * optimisation */ === modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp' --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp 2011-03-29 17:26:47 +0000 +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp 2011-04-13 08:51:04 +0000 @@ -3291,7 +3291,6 @@ Dbtup::read_lcp(const Uint32* inBuf, Uin dst[0] = req_struct->frag_page_id; dst[1] = req_struct->operPtrP->m_tuple_location.m_page_idx; ndbassert(req_struct->m_tuple_ptr->m_data != 0); - ndbassert(fixsz < 8192); memcpy(dst+2, req_struct->m_tuple_ptr->m_data, fixsz); if (varstart) === modified file 'storage/ndb/src/ndbapi/Ndb.cpp' --- a/storage/ndb/src/ndbapi/Ndb.cpp 2011-02-10 07:55:45 +0000 +++ b/storage/ndb/src/ndbapi/Ndb.cpp 2011-04-13 19:33:59 +0000 @@ -2194,6 +2194,17 @@ Ndb::getNdbErrorDetail(const NdbError& e DBUG_RETURN(NULL); } +void +Ndb::setCustomData(void* _customDataPtr) +{ + theImpl->customDataPtr = _customDataPtr; +} + +void* +Ndb::getCustomData() const +{ + return theImpl->customDataPtr; +} Uint32 Ndb::getMinDbNodeVersion() const === modified file 'storage/ndb/src/ndbapi/NdbImpl.hpp' --- a/storage/ndb/src/ndbapi/NdbImpl.hpp 2011-04-06 14:16:13 +0000 +++ b/storage/ndb/src/ndbapi/NdbImpl.hpp 2011-04-13 19:33:59 +0000 @@ -124,6 +124,8 @@ public: } BaseString m_systemPrefix; // Buffer for preformatted for // + + void* customDataPtr; Uint64 clientStats[ Ndb::NumClientStatistics ]; === modified file 'storage/ndb/src/ndbapi/Ndbinit.cpp' --- a/storage/ndb/src/ndbapi/Ndbinit.cpp 2011-02-04 17:52:38 +0000 +++ b/storage/ndb/src/ndbapi/Ndbinit.cpp 2011-04-13 19:33:59 +0000 @@ -192,7 +192,8 @@ NdbImpl::NdbImpl(Ndb_cluster_connection 1024,1024), theNoOfDBnodes(0), theWaiter(this), - m_ev_op(0) + m_ev_op(0), + customDataPtr(0) { int i; for (i = 0; i < MAX_NDB_NODES; i++) { === modified file 'storage/ndb/test/include/NDBT_Tables.hpp' --- a/storage/ndb/test/include/NDBT_Tables.hpp 2011-02-02 00:40:07 +0000 +++ b/storage/ndb/test/include/NDBT_Tables.hpp 2011-04-13 08:51:04 +0000 @@ -46,11 +46,17 @@ public: STATIC_CONST(MinKeyMaxVarTypeAttrBytes= MinKeyMaxAttrBytes - 2); STATIC_CONST(UniqueIndexOverheadBytes= 4); // For FragId - STATIC_CONST(MaxKeyMaxVarTypeAttrBytesIndex = - MaxKeyMaxVarTypeAttrBytes - UniqueIndexOverheadBytes); - /* Hugo requires 2 unsigned int columns somewhere in the table */ - STATIC_CONST(HugoOverheadBytes= 2 * 4); + // Note that since we'll put an unique index on this...it can't be bigger + // than MaxKeyBytes + STATIC_CONST(MaxKeyMaxVarTypeAttrBytesIndex = + ((MaxKeyMaxVarTypeAttrBytes <= MaxKeyBytes) ? + MaxKeyMaxVarTypeAttrBytes : MaxKeyBytes) - UniqueIndexOverheadBytes); + + /* Hugo requires 2 unsigned int columns somewhere in the table + * and these also counts towards #attributes relation + */ + STATIC_CONST(HugoOverheadBytes= 2 * (4 + 4)); static int createTable(Ndb* pNdb, const char* _name, bool _temp = false, bool existsOK = false, NDBT_CreateTableHook = 0, === modified file 'storage/ndb/test/src/NDBT_Tables.cpp' --- a/storage/ndb/test/src/NDBT_Tables.cpp 2011-02-02 00:40:07 +0000 +++ b/storage/ndb/test/src/NDBT_Tables.cpp 2011-04-13 08:51:04 +0000 @@ -918,14 +918,14 @@ NDBT_Table* createMaxKeyMaxColsHugoTabDe /* Last attr uses remaining attr space */ BaseString::snprintf(namebuff, buffsize, "A%d", attrNum); + Uint32 sz32 = NDB_MAX_TUPLE_SIZE_IN_WORDS; + sz32 -= NDB_MAX_KEYSIZE_IN_WORDS; + sz32 -= NDB_MAX_ATTRIBUTES_IN_INDEX; + sz32 -= 2 * NDB_MAX_ATTRIBUTES_IN_TABLE; attrs[attrNum]= new NDBT_Attribute(namebuff, - NdbDictionary::Column::Char, - (NDB_MAX_TUPLE_SIZE_IN_WORDS - - NDB_MAX_KEYSIZE_IN_WORDS - - ((NDB_MAX_ATTRIBUTES_IN_TABLE - - NDB_MAX_ATTRIBUTES_IN_INDEX) - 1)) * 4, + NdbDictionary::Column::Char, 4 * sz32, false); - + WIDE_MAXKEYMAXCOLS_HUGO= new NDBT_Table(name, NDB_MAX_ATTRIBUTES_IN_TABLE, attrs); No bundle (reason: useless for push emails).