List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:May 31 2011 9:23am
Subject:bzr push into mysql-5.1-telco-7.0-wl4124-new0 branch (jonas:4387 to 4388)
View as plain text  
 4388 Jonas Oreland	2011-05-31 [merge]
      ndb - merge 70-main back into mysql-5.1-telco-7.0-wl4124-new0

    modified:
      mysql-test/suite/ndb/r/ndb_restore_misc.result
      mysql-test/suite/ndb/t/ndb_restore_misc.test
      storage/ndb/include/kernel/signaldata/ScanTab.hpp
      storage/ndb/include/mgmapi/mgmapi_config_parameters.h
      storage/ndb/include/ndb_constants.h
      storage/ndb/include/ndbapi/NdbDictionary.hpp
      storage/ndb/include/ndbapi/NdbScanOperation.hpp
      storage/ndb/src/common/debugger/signaldata/ScanTab.cpp
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
      storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp
      storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp
      storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
      storage/ndb/src/kernel/blocks/suma/Suma.cpp
      storage/ndb/src/kernel/blocks/trix/Trix.cpp
      storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
      storage/ndb/src/ndbapi/ndberror.c
      storage/ndb/tools/restore/Restore.cpp
      storage/ndb/tools/restore/consumer_restore.cpp
 4387 Pekka Nousiainen	2011-05-30
      wl#4124 d03_systab.diff
      revert NDBCNTR and use TRIX

    modified:
      storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp
      storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp
      storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
      storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp
      storage/ndb/src/kernel/blocks/trix/Trix.cpp
      storage/ndb/src/kernel/blocks/trix/Trix.hpp
=== modified file 'mysql-test/suite/ndb/r/ndb_restore_misc.result'
--- a/mysql-test/suite/ndb/r/ndb_restore_misc.result	2011-05-19 09:16:32 +0000
+++ b/mysql-test/suite/ndb/r/ndb_restore_misc.result	2011-05-31 08:28:58 +0000
@@ -623,12 +623,8 @@ name VARCHAR(255)
 
 ndb_show_tables completed.....
 
-select id into @tmp1 from ndb_show_tables_results
-where name like '%NDB$IS_SAMPLE_X1%';
 select * from ndb_show_tables_results
 where type like '%Index%'
-and name not like '%NDB$IS_SAMPLE_X1%'
-and name not like concat('%NDB$INDEX_',@tmp1,'_CUSTOM%')
 order by 1,2,3,4,5,6,7;
 id	type	state	logging	_database	_schema	name
 drop table ndb_show_tables_results;

=== modified file 'mysql-test/suite/ndb/t/ndb_restore_misc.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_misc.test	2011-05-19 09:16:32 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_misc.test	2011-05-31 08:28:58 +0000
@@ -546,15 +546,8 @@ CREATE TEMPORARY TABLE IF NOT EXISTS ndb
   name VARCHAR(255)
 );
 --source ndb_show_tables_result.inc
-# the db fields include single quotes...
---disable_warnings
-select id into @tmp1 from ndb_show_tables_results
-where name like '%NDB$IS_SAMPLE_X1%';
---enable_warnings
 select * from ndb_show_tables_results
 where type like '%Index%'
-and name not like '%NDB$IS_SAMPLE_X1%'
-and name not like concat('%NDB$INDEX_',@tmp1,'_CUSTOM%')
 order by 1,2,3,4,5,6,7;
 drop table ndb_show_tables_results;
 

=== modified file 'storage/ndb/include/kernel/signaldata/ScanTab.hpp'
--- a/storage/ndb/include/kernel/signaldata/ScanTab.hpp	2011-05-19 09:16:32 +0000
+++ b/storage/ndb/include/kernel/signaldata/ScanTab.hpp	2011-05-31 08:28:58 +0000
@@ -108,7 +108,6 @@ private:
   static Uint32 getViaSPJFlag(const Uint32 & requestInfo);
   static Uint32 getPassAllConfsFlag(const Uint32 & requestInfo);
   static Uint32 get4WordConf(const Uint32&);
-  static UintR getStatScanFlag(const UintR & requestInfo);
 
   /**
    * Set:ers for requestInfo
@@ -128,7 +127,6 @@ private:
   static void setViaSPJFlag(Uint32 & requestInfo, Uint32 val);
   static void setPassAllConfsFlag(Uint32 & requestInfo, Uint32 val);
   static void set4WordConf(Uint32 & requestInfo, Uint32 val);
-  static void setStatScanFlag(UintR & requestInfo, UintR val);
 };
 
 /**
@@ -152,11 +150,10 @@ private:
  j = Via SPJ flag          - 1  Bit 27
  a = Pass all confs flag   - 1  Bit 28
  f = 4 word conf           - 1  Bit 29
- s = Stat scan             - 1  Bit 30  index stats
 
            1111111111222222222233
  01234567890123456789012345678901
- pppppppplnhcktzxbbbbbbbbbbdjafs
+ pppppppplnhcktzxbbbbbbbbbbdjaf
 */
 
 #define PARALLEL_SHIFT     (0)
@@ -196,8 +193,6 @@ private:
 #define SCAN_PASS_CONF_SHIFT (28)
 #define SCAN_4WORD_CONF_SHIFT (29)
 
-#define STAT_SCAN_SHIFT (30)
-
 inline
 Uint8
 ScanTabReq::getParallelism(const UintR & requestInfo){
@@ -397,19 +392,6 @@ ScanTabReq::set4WordConf(UintR & request
   requestInfo |= (flag << SCAN_4WORD_CONF_SHIFT);
 }
 
-inline
-UintR 
-ScanTabReq::getStatScanFlag(const UintR & requestInfo){
-  return (requestInfo >> STAT_SCAN_SHIFT) & 1;
-}
-
-inline
-void 
-ScanTabReq::setStatScanFlag(UintR & requestInfo, Uint32 flag){
-  ASSERT_BOOL(flag, "ScanTabReq::setStatScanFlag");
-  requestInfo |= (flag << STAT_SCAN_SHIFT);
-}
-
 /**
  * 
  * SENDER:  Dbtc

=== modified file 'storage/ndb/include/mgmapi/mgmapi_config_parameters.h'
--- a/storage/ndb/include/mgmapi/mgmapi_config_parameters.h	2011-05-19 09:16:32 +0000
+++ b/storage/ndb/include/mgmapi/mgmapi_config_parameters.h	2011-05-31 08:28:58 +0000
@@ -186,18 +186,18 @@
 
 #define CFG_DB_START_NO_NODEGROUP_TIMEOUT 619
 
+#define CFG_DB_INDEX_STAT_AUTO_CREATE    620
+#define CFG_DB_INDEX_STAT_AUTO_UPDATE    621
+#define CFG_DB_INDEX_STAT_SAVE_SIZE      622
+#define CFG_DB_INDEX_STAT_SAVE_SCALE     623
+#define CFG_DB_INDEX_STAT_TRIGGER_PCT    624
+#define CFG_DB_INDEX_STAT_TRIGGER_SCALE  625
+#define CFG_DB_INDEX_STAT_UPDATE_DELAY   626
+
 #define CFG_NODE_ARBIT_RANK           200
 #define CFG_NODE_ARBIT_DELAY          201
 #define CFG_RESERVED_SEND_BUFFER_MEMORY 202
 
-#define CFG_DB_INDEX_STAT_AUTO_CREATE    203
-#define CFG_DB_INDEX_STAT_AUTO_UPDATE    204
-#define CFG_DB_INDEX_STAT_SAVE_SIZE      205
-#define CFG_DB_INDEX_STAT_SAVE_SCALE     206
-#define CFG_DB_INDEX_STAT_TRIGGER_PCT    207
-#define CFG_DB_INDEX_STAT_TRIGGER_SCALE  208
-#define CFG_DB_INDEX_STAT_UPDATE_DELAY   209
-
 #define CFG_MIN_LOGLEVEL          250
 #define CFG_LOGLEVEL_STARTUP      250
 #define CFG_LOGLEVEL_SHUTDOWN     251

=== modified file 'storage/ndb/include/ndb_constants.h'
--- a/storage/ndb/include/ndb_constants.h	2011-02-16 14:53:53 +0000
+++ b/storage/ndb/include/ndb_constants.h	2011-05-31 08:28:58 +0000
@@ -112,4 +112,16 @@
  */
 #define NDB_BACKUP_SEQUENCE 0x1F000000
 
+/**
+ * Defines for index statistics
+ */
+#define NDB_INDEX_STAT_DB     "mysql"
+#define NDB_INDEX_STAT_SCHEMA "def"
+
+#define NDB_INDEX_STAT_HEAD_TABLE    "NDB$IS_HEAD"
+#define NDB_INDEX_STAT_SAMPLE_TABLE  "NDB$IS_SAMPLE"
+#define NDB_INDEX_STAT_SAMPLE_INDEX1 "NDB$IS_SAMPLE_X1"
+
+#define NDB_INDEX_STAT_PREFIX        "NDB$IS"
+
 #endif

=== modified file 'storage/ndb/include/ndbapi/NdbDictionary.hpp'
--- a/storage/ndb/include/ndbapi/NdbDictionary.hpp	2011-05-25 15:03:11 +0000
+++ b/storage/ndb/include/ndbapi/NdbDictionary.hpp	2011-05-31 08:28:58 +0000
@@ -612,8 +612,6 @@ public:
     static const Column * OPTIMIZE;
     static const Column * FRAGMENT_EXTENT_SPACE;
     static const Column * FRAGMENT_FREE_EXTENT_SPACE;
-    static const Column * INDEX_STAT_KEY;
-    static const Column * INDEX_STAT_VALUE;
 
     int getSizeInBytes() const;
 

=== modified file 'storage/ndb/include/ndbapi/NdbScanOperation.hpp'
--- a/storage/ndb/include/ndbapi/NdbScanOperation.hpp	2011-05-19 09:16:32 +0000
+++ b/storage/ndb/include/ndbapi/NdbScanOperation.hpp	2011-05-31 08:28:58 +0000
@@ -82,9 +82,7 @@ public:
       It is enabled by default for scans using LM_Exclusive, but must be
       explicitly specified to enable the taking-over of LM_Read locks.
     */
-    SF_KeyInfo = 1,
-    /* Statistics scan (INDEX_STAT) */
-    SF_StatScan = 2
+    SF_KeyInfo = 1
   };
 
 

=== modified file 'storage/ndb/src/common/debugger/signaldata/ScanTab.cpp'
--- a/storage/ndb/src/common/debugger/signaldata/ScanTab.cpp	2011-05-19 09:16:32 +0000
+++ b/storage/ndb/src/common/debugger/signaldata/ScanTab.cpp	2011-05-31 08:28:58 +0000
@@ -31,7 +31,7 @@ printSCANTABREQ(FILE * output, const Uin
   fprintf(output, " apiConnectPtr: H\'%.8x", 
 	  sig->apiConnectPtr);
   fprintf(output, " requestInfo: H\'%.8x:\n",  requestInfo);
-  fprintf(output, "  Parallellism: %u Batch: %u LockMode: %u Keyinfo: %u Holdlock: %u RangeScan: %u Descending: %u TupScan: %u\n ReadCommitted: %u DistributionKeyFlag: %u NoDisk: %u spj: %u StatScan: %u",
+  fprintf(output, "  Parallellism: %u Batch: %u LockMode: %u Keyinfo: %u Holdlock: %u RangeScan: %u Descending: %u TupScan: %u\n ReadCommitted: %u DistributionKeyFlag: %u NoDisk: %u spj: %u",
 	  sig->getParallelism(requestInfo), 
 	  sig->getScanBatch(requestInfo), 
 	  sig->getLockMode(requestInfo), 
@@ -43,8 +43,7 @@ printSCANTABREQ(FILE * output, const Uin
 	  sig->getReadCommittedFlag(requestInfo),
 	  sig->getDistributionKeyFlag(requestInfo),
 	  sig->getNoDiskFlag(requestInfo),
-          sig->getViaSPJFlag(requestInfo),
-          sig->getStatScanFlag(requestInfo));
+          sig->getViaSPJFlag(requestInfo));
   
   if(sig->getDistributionKeyFlag(requestInfo))
     fprintf(output, " DKey: %x", sig->distributionKey);

=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2011-05-25 15:03:11 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2011-05-31 08:28:58 +0000
@@ -12159,7 +12159,7 @@ Dbdict::alterIndex_parse(Signal* signal,
     }
 
     // skip system indexes (at least index stats indexes)
-    if (strstr(indexName, "/NDB$IS_") != 0) {
+    if (strstr(indexName, "/" NDB_INDEX_STAT_PREFIX) != 0) {
       jam();
       D("skip index stats operations for system index");
       alterIndexPtr.p->m_sub_index_stat_dml = true;

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2011-05-29 10:55:32 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2011-05-31 08:28:58 +0000
@@ -4367,8 +4367,8 @@ void Dblqh::execLQHKEYREQ(Signal* signal
 
   {
     const NodeBitmask& all = globalTransporterRegistry.get_status_overloaded();
-    if (unlikely(!all.isclear() &&
-                 checkTransporterOverloaded(signal, all, lqhKeyReq)) ||
+    if (unlikely((!all.isclear() &&
+                  checkTransporterOverloaded(signal, all, lqhKeyReq))) ||
         ERROR_INSERTED_CLEAR(5047)) {
       jam();
       releaseSections(handle);

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2011-05-29 10:55:32 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2011-05-31 08:28:58 +0000
@@ -5118,9 +5118,6 @@ void Dbtc::linkApiToGcp(Ptr<GcpRecord> r
 void
 Dbtc::crash_gcp(Uint32 line)
 {
-  UintR Tfirstgcp = cfirstgcp;
-  UintR TgcpFilesize = cgcpFilesize;
-  GcpRecord *localGcpRecord = gcpRecord;
   GcpRecordPtr localGcpPointer;
 
   localGcpPointer.i = cfirstgcp;
@@ -7802,10 +7799,10 @@ void Dbtc::sendAbortedAfterTimeout(Signa
 	for(Uint32 i = 0; i<TloopCount; i++)
 	{
 	  BaseString::snprintf(buf2, sizeof(buf2), "%s %d", buf, tmp[i]);
-	  BaseString::snprintf(buf, sizeof(buf), buf2);
+	  BaseString::snprintf(buf, sizeof(buf), "%s", buf2);
 	}
-	warningEvent(buf);
-	ndbout_c(buf);
+	warningEvent("%s", buf);
+	ndbout_c("%s", buf);
 	ndbrequire(false);
 	releaseAbortResources(signal);
 	return;
@@ -10671,7 +10668,6 @@ Dbtc::initScanrec(ScanRecordPtr scanptr,
   ScanFragReq::setDescendingFlag(tmp, ScanTabReq::getDescendingFlag(ri));
   ScanFragReq::setTupScanFlag(tmp, ScanTabReq::getTupScanFlag(ri));
   ScanFragReq::setNoDiskFlag(tmp, ScanTabReq::getNoDiskFlag(ri));
-  ScanFragReq::setStatScanFlag(tmp, ScanTabReq::getStatScanFlag(ri));
   if (ScanTabReq::getViaSPJFlag(ri))
   {
     jam();
@@ -13439,7 +13435,7 @@ Dbtc::match_and_print(Signal* signal, Ap
 		       apiTimer ? (ctcTimer - apiTimer) / 100 : 0,
 		       c_apiConTimer_line[apiPtr.i],
 		       stateptr);
-  infoEvent(buf);
+  infoEvent("%s", buf);
   
   memcpy(signal->theData, temp, 4*len);
   return true;

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp	2011-05-25 14:31:47 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp	2011-05-30 08:50:17 +0000
@@ -866,7 +866,9 @@ skip_disk:
     {
       jam();
       if (get_page)
+      {
         ndbassert(tuple_ptr->m_header_bits & Tuple_header::DISK_PART);
+      }
       dealloc_tuple(signal, gci_hi, gci_lo, page.p, tuple_ptr,
                     &req_struct, regOperPtr.p, regFragPtr.p, regTabPtr.p);
     }

=== modified file 'storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp	2011-05-19 09:40:36 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp	2011-05-31 08:28:58 +0000
@@ -333,8 +333,8 @@ Dbtux::printNode(TuxCtx & ctx,
     int ret = cmpSearchKey(ctx, entryKey1, entryKey2, index.m_numAttrs);
     if (ret == 0)
       ret = ent1.cmp(ent2);
-    if (i == 0 && ! (ret < 0) ||
-        i == 1 && ! (ret > 0)) {
+    if ((i == 0 && ! (ret < 0)) ||
+        (i == 1 && ! (ret > 0))) {
       par.m_ok = false;
       out << par.m_path << sep;
       out << " disorder wrt subtree " << i << endl;

=== modified file 'storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp	2011-05-19 09:40:36 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp	2011-05-31 08:28:58 +0000
@@ -320,7 +320,7 @@ Dbtux::readKeyAttrs(TuxCtx& ctx, const F
   const Uint32* keyAttrs32 = (const Uint32*)&keyAttrs[0];
 
   int ret;
-  ret = c_tup->tuxReadAttrs(ctx.jamBuffer, tableFragPtrI, tupLoc.getPageId(), tupLoc.getPageOffset(), tupVersion, keyAttrs32, count, outputBuffer, false);
+  ret = c_tup->tuxReadAttrs(ctx.jamBuffer, tableFragPtrI, pageId, pageOffset, tupVersion, keyAttrs32, count, outputBuffer, false);
   jamEntry();
   ndbrequire(ret > 0);
   keyData.reset();

=== modified file 'storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp'
--- a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp	2011-02-03 14:20:36 +0000
+++ b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp	2011-05-30 08:50:17 +0000
@@ -354,7 +354,7 @@ DbUtil::execTCSEIZECONF(Signal* signal){
 void
 DbUtil::execCONTINUEB(Signal* signal){
   jamEntry();
-  const Uint32 Tdata0 = signal->theData[0];
+  //const Uint32 Tdata0 = signal->theData[0];
 
   ndbrequire(0);
 }

=== modified file 'storage/ndb/src/kernel/blocks/suma/Suma.cpp'
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2011-05-29 10:55:32 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2011-05-31 08:28:58 +0000
@@ -2745,7 +2745,7 @@ Suma::SyncRecord::nextScan(Signal* signa
   
   ScanFragReq * req = (ScanFragReq *)signal->getDataPtrSend();
   const Uint32 parallelism = 16;
-  const Uint32 attrLen = 5 + attrBuf.getSize();
+  //const Uint32 attrLen = 5 + attrBuf.getSize();
 
   req->senderData = ptrI;
   req->resultRef = suma.reference();

=== modified file 'storage/ndb/src/kernel/blocks/trix/Trix.cpp'
--- a/storage/ndb/src/kernel/blocks/trix/Trix.cpp	2011-05-30 08:24:14 +0000
+++ b/storage/ndb/src/kernel/blocks/trix/Trix.cpp	2011-05-31 08:28:58 +0000
@@ -1744,7 +1744,7 @@ Trix::g_statMetaSample_column[] = {
 
 const Trix::SysTable
 Trix::g_statMetaHead = {
-  "sys/def/NDB$IS_HEAD",
+  NDB_INDEX_STAT_DB "/" NDB_INDEX_STAT_SCHEMA "/" NDB_INDEX_STAT_HEAD_TABLE,
   ~(Uint32)0,
   sizeof(g_statMetaHead_column)/sizeof(g_statMetaHead_column[0]),
   g_statMetaHead_column
@@ -1752,7 +1752,7 @@ Trix::g_statMetaHead = {
 
 const Trix::SysTable
 Trix::g_statMetaSample = {
-  "sys/def/NDB$IS_SAMPLE",
+  NDB_INDEX_STAT_DB "/" NDB_INDEX_STAT_SCHEMA "/" NDB_INDEX_STAT_SAMPLE_TABLE,
   ~(Uint32)0,
   sizeof(g_statMetaSample_column)/sizeof(g_statMetaSample_column[0]),
   g_statMetaSample_column
@@ -1760,7 +1760,7 @@ Trix::g_statMetaSample = {
 
 const Trix::SysIndex
 Trix::g_statMetaSampleX1 = {
-  "sys/def/%u/NDB$IS_SAMPLE_X1",
+  NDB_INDEX_STAT_DB "/" NDB_INDEX_STAT_SCHEMA "/%u/" NDB_INDEX_STAT_SAMPLE_INDEX1,
   ~(Uint32)0,
   ~(Uint32)0
 };

=== modified file 'storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2011-05-25 15:03:11 +0000
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2011-05-31 08:28:58 +0000
@@ -396,10 +396,6 @@ NdbColumnImpl::create_pseudo_columns()
     NdbColumnImpl::create_pseudo("NDB$LOCK_REF");
   NdbDictionary::Column::OP_ID = 
     NdbColumnImpl::create_pseudo("NDB$OP_ID");
-  NdbDictionary::Column::INDEX_STAT_KEY =
-    NdbColumnImpl::create_pseudo("NDB$INDEX_STAT_KEY");
-  NdbDictionary::Column::INDEX_STAT_VALUE =
-    NdbColumnImpl::create_pseudo("NDB$INDEX_STAT_VALUE");
 }
 
 void
@@ -449,11 +445,6 @@ NdbColumnImpl::destory_pseudo_columns()
   delete NdbDictionary::Column::OP_ID;
   NdbDictionary::Column::LOCK_REF = 0;
   NdbDictionary::Column::OP_ID = 0;
-
-  delete NdbDictionary::Column::INDEX_STAT_KEY;
-  delete NdbDictionary::Column::INDEX_STAT_VALUE;
-  NdbDictionary::Column::INDEX_STAT_KEY = 0;
-  NdbDictionary::Column::INDEX_STAT_VALUE = 0;
 }
 
 NdbDictionary::Column *
@@ -563,16 +554,6 @@ NdbColumnImpl::create_pseudo(const char
     col->m_impl.m_attrId = AttributeHeader::OP_ID;
     col->m_impl.m_attrSize = 8;
     col->m_impl.m_arraySize = 1;
-  } else if (!strcmp(name, "NDB$INDEX_STAT_KEY")){
-    col->setType(NdbDictionary::Column::Longvarbinary);
-    col->m_impl.m_attrId = AttributeHeader::INDEX_STAT_KEY;
-    col->m_impl.m_attrSize = 1;
-    col->m_impl.m_arraySize = 2 + MAX_INDEX_STAT_KEY_SIZE * 4;;
-  } else if (!strcmp(name, "NDB$INDEX_STAT_VALUE")){
-    col->setType(NdbDictionary::Column::Longvarbinary);
-    col->m_impl.m_attrId = AttributeHeader::INDEX_STAT_VALUE;
-    col->m_impl.m_attrSize = 1;
-    col->m_impl.m_arraySize = 2 + MAX_INDEX_STAT_VALUE_SIZE * 4;
   }
   else {
     abort();
@@ -8500,7 +8481,4 @@ const NdbDictionary::Column * NdbDiction
 const NdbDictionary::Column * NdbDictionary::Column::LOCK_REF = 0;
 const NdbDictionary::Column * NdbDictionary::Column::OP_ID = 0;
 
-const NdbDictionary::Column * NdbDictionary::Column::INDEX_STAT_KEY = 0;
-const NdbDictionary::Column * NdbDictionary::Column::INDEX_STAT_VALUE = 0;
-
 template class Vector<NdbDictInterface::Tx::Op>;

=== modified file 'storage/ndb/src/ndbapi/ndberror.c'
--- a/storage/ndb/src/ndbapi/ndberror.c	2011-05-25 15:03:11 +0000
+++ b/storage/ndb/src/ndbapi/ndberror.c	2011-05-31 08:28:58 +0000
@@ -540,7 +540,7 @@ ErrorBundle ErrorCodes[] = {
   /*
    * Index stats error codes
    */
-  { 4714, DMEC, AE, "Index stats sys tables NDB$IS are invalid" },
+  { 4714, DMEC, AE, "Index stats sys tables " NDB_INDEX_STAT_PREFIX " are invalid" },
   { 4715, DMEC, AE, "Index stats for specified index do not exist" },
   { 4716, DMEC, AE, "Index stats methods usage error" },
   { 4717, DMEC, AE, "Index stats cannot allocate memory" },

=== modified file 'storage/ndb/tools/restore/Restore.cpp'
--- a/storage/ndb/tools/restore/Restore.cpp	2011-05-19 09:16:32 +0000
+++ b/storage/ndb/tools/restore/Restore.cpp	2011-05-31 08:28:58 +0000
@@ -524,8 +524,9 @@ RestoreMetaData::markSysTables()
         strcmp(tableName, "sys/def/SYSTAB_0") == 0 ||
         strcmp(tableName, "sys/def/NDB$EVENTS_0") == 0 ||
         // index stats tables and indexes
-        strncmp(tableName, "NDB$IS_", 7) == 0 ||
-        strstr(tableName, "/NDB$IS_") != 0 ||
+        strncmp(tableName, NDB_INDEX_STAT_PREFIX,
+                sizeof(NDB_INDEX_STAT_PREFIX)-1) == 0 ||
+        strstr(tableName, "/" NDB_INDEX_STAT_PREFIX) != 0 ||
         /*
           The following is for old MySQL versions,
            before we changed the database name of the tables from

=== modified file 'storage/ndb/tools/restore/consumer_restore.cpp'
--- a/storage/ndb/tools/restore/consumer_restore.cpp	2011-05-19 09:16:32 +0000
+++ b/storage/ndb/tools/restore/consumer_restore.cpp	2011-05-31 08:28:58 +0000
@@ -1794,8 +1794,7 @@ BackupRestore::table(const TableS & tabl
   
   const NdbTableImpl & tmptab = NdbTableImpl::getImpl(* table.m_dictTable);
   if ((int) tmptab.m_indexType != (int) NdbDictionary::Index::Undefined){
-    if (!table.getSysTable())
-      m_indexes.push_back(table.m_dictTable);
+    m_indexes.push_back(table.m_dictTable);
     return true;
   }
   

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0-wl4124-new0 branch (jonas:4387 to 4388) Jonas Oreland31 May