summaryrefslogtreecommitdiff
path: root/ndb/include
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2005-06-02 14:32:06 +0200
committerunknown <msvensson@neptunus.(none)>2005-06-02 14:32:06 +0200
commit43ebae40aac909392a7cc26ef02008ae6e162b79 (patch)
tree0cad90ece9bf32150f53a88f08f921b9bf90019d /ndb/include
parent889fa8aee4d626b61c5831db9c3e6cc4875f3cc4 (diff)
downloadmariadb-git-43ebae40aac909392a7cc26ef02008ae6e162b79.tar.gz
BUG#9626 Several serious errors reported by Valgrind in latest 5.0 bk tree
- Fix several valgrind warnings. ndb/include/kernel/AttributeList.hpp: Include ndb_limits.h ndb/include/ndbapi/Ndb.hpp: Add new function internalize_table_name Proper formatting ndb/include/util/SimpleProperties.hpp: Add function "add" for adding strings/data to word buffers without reading after the string/data Fix comment for UtilBufferWriter ndb/src/common/util/SimpleProperties.cpp: Add function "add" for adding strings/data to word buffers without reading after the string/data ndb/src/ndbapi/DictCache.cpp: Add DBUG printouts to all functions in GlobalDictCache Change ndbout_c to DBUG_PRINT Add function GlobalDictCache::printCache ndb/src/ndbapi/DictCache.hpp: Add function GlobalDictCache::printCache ndb/src/ndbapi/Ndb.cpp: Change DEBUG_TRACE to DBUG_PRINT, DBUG_ENTER Use new function internalize_table_name, and create internal tabname on stack ndb/src/ndbapi/NdbDictionary.cpp: Add DBUG_ENTER calls ndb/src/ndbapi/NdbDictionaryImpl.cpp: Pass BaseString as reference when passing internal table name to internal functions. Remove check for exceeding MAX_SECTION_SIZE. Remove pekkas fix that saves internalName in save_me variable, not needed when tablename is stack variable. NdbDictInterface::gettable(int tableid, ...) - Not used ndb/src/ndbapi/NdbDictionaryImpl.hpp: Remove include of ndb_limits.h Use BaseString& for internal functions Remove m_namebuf, not needed, uses m_buffer Formatting NdbDictInterface::getTable(int tableId, ...) - Not used ndb/src/ndbapi/NdbImpl.hpp: Remove buffer for m_internalname, placed on stack of caller. Moved impl of internalize_table_name and internalize_index_anme to Ndb::internalize_table_name and Ndb::internalize_index_name ndb/src/ndbapi/NdbLinHash.hpp: Save also the terminating null character in chain->str to get nicer printouts. ndb/src/ndbapi/NdbTransaction.cpp: Remove hardcoded buffer sizes. Remove include of ndb_limits.h sql/ha_ndbcluster.cc: Fix "typo", use file_name var since that is the current files name,
Diffstat (limited to 'ndb/include')
-rw-r--r--ndb/include/kernel/AttributeList.hpp2
-rw-r--r--ndb/include/ndbapi/Ndb.hpp12
-rw-r--r--ndb/include/util/SimpleProperties.hpp4
3 files changed, 12 insertions, 6 deletions
diff --git a/ndb/include/kernel/AttributeList.hpp b/ndb/include/kernel/AttributeList.hpp
index 7c6f71df3d2..70b178c6c79 100644
--- a/ndb/include/kernel/AttributeList.hpp
+++ b/ndb/include/kernel/AttributeList.hpp
@@ -17,6 +17,8 @@
#ifndef ATTRIBUTE_LIST_HPP
#define ATTRIBUTE_LIST_HPP
+#include "ndb_limits.h"
+
/**
* Masks and lists used by index and trigger. Must be plain old Uint32 data.
* XXX depends on other headers XXX move to some common file
diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp
index a36cdc2b475..cefe6477cdd 100644
--- a/ndb/include/ndbapi/Ndb.hpp
+++ b/ndb/include/ndbapi/Ndb.hpp
@@ -1583,15 +1583,17 @@ private:
void abortTransactionsAfterNodeFailure(Uint16 aNodeId);
static
- const char * externalizeTableName(const char * internalTableName, bool fullyQualifiedNames);
+ const char * externalizeTableName(const char * internalTableName,
+ bool fullyQualifiedNames);
const char * externalizeTableName(const char * internalTableName);
- const char * internalizeTableName(const char * externalTableName);
+ const BaseString internalize_table_name(const char * external_name) const;
static
- const char * externalizeIndexName(const char * internalIndexName, bool fullyQualifiedNames);
+ const char * externalizeIndexName(const char * internalIndexName,
+ bool fullyQualifiedNames);
const char * externalizeIndexName(const char * internalIndexName);
- const char * internalizeIndexName(const NdbTableImpl * table,
- const char * externalIndexName);
+ const BaseString internalize_index_name(const NdbTableImpl * table,
+ const char * external_name) const;
static
const BaseString getDatabaseFromInternalName(const char * internalName);
diff --git a/ndb/include/util/SimpleProperties.hpp b/ndb/include/util/SimpleProperties.hpp
index 356f3406f38..438426fb62b 100644
--- a/ndb/include/util/SimpleProperties.hpp
+++ b/ndb/include/util/SimpleProperties.hpp
@@ -172,6 +172,8 @@ public:
virtual bool reset() = 0;
virtual bool putWord(Uint32 val) = 0;
virtual bool putWords(const Uint32 * src, Uint32 len) = 0;
+ private:
+ bool add(const char* value, int len);
};
};
@@ -211,7 +213,7 @@ private:
};
/**
- * Writer for linear memory
+ * Writer for UtilBuffer
*/
class UtilBufferWriter : public SimpleProperties::Writer {
public: