Commit 5a751742 authored by unknown's avatar unknown
Browse files

NdbEventOperationImpl.cpp, NdbEventOperation.cpp, NdbEventOperation.hpp:

  Put back getTable
NdbDictionaryImpl.cpp, NdbDictionary.cpp, NdbDictionary.hpp:
  Added putTable


storage/ndb/include/ndbapi/NdbDictionary.hpp:
  Added putTable
storage/ndb/include/ndbapi/NdbEventOperation.hpp:
  Put back getTable
storage/ndb/src/ndbapi/NdbDictionary.cpp:
  Added putTable
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Added putTable
storage/ndb/src/ndbapi/NdbEventOperation.cpp:
  Put back getTable
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
  Put back getTable
parent 7088b39d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1588,6 +1588,14 @@ public:
     */
    const Table * getTable(const char * name) const;

#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
    /*
     * Save a table definition in dictionary cache
     * @param table Object to put into cache
     */
    void putTable(const Table * table);
#endif

    /**
     * Get index with given name, NULL if undefined
     * @param indexName  Name of index to get.
+1 −0
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ public:

#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
  /** these are subject to change at any time */
  const NdbDictionary::Table* getTable() const;
  const NdbDictionary::Event *getEvent() const;
  const NdbRecAttr *getFirstPkAttr() const;
  const NdbRecAttr *getFirstPkPreAttr() const;
+7 −0
Original line number Diff line number Diff line
@@ -1337,6 +1337,13 @@ NdbDictionary::Dictionary::getTable(const char * name, void **data) const
  return 0;
}

void NdbDictionary::Dictionary::putTable(const NdbDictionary::Table * table)
{
 NdbDictionary::Table  *copy_table = new NdbDictionary::Table;
  *copy_table = *table;
  m_impl.putTable(&NdbTableImpl::getImpl(*copy_table));
}

void NdbDictionary::Dictionary::set_local_table_data_size(unsigned sz)
{
  m_impl.m_local_table_data_size= sz;
+7 −0
Original line number Diff line number Diff line
@@ -1271,7 +1271,14 @@ NdbDictionaryImpl::fetchGlobalTableImpl(const BaseString& internalTableName)
void
NdbDictionaryImpl::putTable(NdbTableImpl *impl)
{
  NdbTableImpl *old;

  m_globalHash->lock();
  if ((old= m_globalHash->get(impl->m_internalName.c_str())))
  {
    old->m_status = NdbDictionary::Object::Invalid;
    m_globalHash->drop(old);
  }
  m_globalHash->put(impl->m_internalName.c_str(), impl);
  m_globalHash->unlock();
  Ndb_local_table_info *info=
+4 −0
Original line number Diff line number Diff line
@@ -144,6 +144,10 @@ NdbEventOperation::print()
/*
 * Internal for the mysql server
 */
const NdbDictionary::Table *NdbEventOperation::getTable() const
{
  return m_impl.m_eventImpl->m_tableImpl->m_facade;
}
const NdbDictionary::Event *NdbEventOperation::getEvent() const
{
  return m_impl.m_eventImpl->m_facade;
Loading