List:Commits« Previous MessageNext Message »
From:tomas Date:February 7 2006 9:03am
Subject:bk commit into 5.1 tree (tomas:1.2074)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2074 06/02/07 10:03:03 tomas@stripped +4 -0
  MySQL Bugs: #16925: ndb, added additional getters on NdbDictionary::Event

  storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
    1.47 06/02/07 10:02:57 tomas@stripped +1 -0
    ndb, added additional getters on NdbDictionary::Event

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
    1.104 06/02/07 10:02:57 tomas@stripped +6 -0
    ndb, added additional getters on NdbDictionary::Event

  storage/ndb/src/ndbapi/NdbDictionary.cpp
    1.50 06/02/07 10:02:57 tomas@stripped +29 -0
    ndb, added additional getters on NdbDictionary::Event

  storage/ndb/include/ndbapi/NdbDictionary.hpp
    1.67 06/02/07 10:02:57 tomas@stripped +9 -0
    ndb, added additional getters on NdbDictionary::Event

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-new

--- 1.66/storage/ndb/include/ndbapi/NdbDictionary.hpp	2006-02-01 14:58:06 +01:00
+++ 1.67/storage/ndb/include/ndbapi/NdbDictionary.hpp	2006-02-07 10:02:57 +01:00
@@ -1218,6 +1218,10 @@
      */
     void addTableEvent(const TableEvent te);
     /**
+     * Check if a specific table event will be detected
+     */
+    bool getTableEvent(const TableEvent te) const;
+    /**
      * Set durability of the event
      */
     void setDurability(EventDurability);
@@ -1269,6 +1273,11 @@
      * @return Number of columns, -1 on error
      */
     int getNoOfEventColumns() const;
+
+    /**
+     * Get a specific column in the event
+     */
+    const Column * getEventColumn(unsigned no) const;
 
     /**
      * The merge events flag is false by default.  Setting it true

--- 1.49/storage/ndb/src/ndbapi/NdbDictionary.cpp	2006-02-01 14:58:06 +01:00
+++ 1.50/storage/ndb/src/ndbapi/NdbDictionary.cpp	2006-02-07 10:02:57 +01:00
@@ -857,6 +857,12 @@
   m_impl.addTableEvent(t);
 }
 
+bool
+NdbDictionary::Event::getTableEvent(const TableEvent t) const
+{
+  return m_impl.getTableEvent(t);
+}
+
 void
 NdbDictionary::Event::setDurability(EventDurability d)
 {
@@ -911,6 +917,29 @@
 int NdbDictionary::Event::getNoOfEventColumns() const
 {
   return m_impl.getNoOfEventColumns();
+}
+
+const NdbDictionary::Column *
+NdbDictionary::Event::getEventColumn(unsigned no) const
+{
+  if (m_impl.m_columns.size())
+  {
+    if (no < m_impl.m_columns.size())
+    {
+      return m_impl.m_columns[no];
+    }
+  }
+  else if (m_impl.m_attrIds.size())
+  {
+    if (no < m_impl.m_attrIds.size())
+    {
+      NdbTableImpl* tab= m_impl.m_tableImpl;
+      if (tab == 0)
+        return 0;
+      return tab->getColumn(m_impl.m_attrIds[no]);
+    }
+  }
+  return 0;
 }
 
 void NdbDictionary::Event::mergeEvents(bool flag)

--- 1.103/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2006-02-05 19:09:00 +01:00
+++ 1.104/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2006-02-07 10:02:57 +01:00
@@ -1143,6 +1143,12 @@
   mi_type |= (unsigned)t;
 }
 
+bool
+NdbEventImpl::getTableEvent(const NdbDictionary::Event::TableEvent t) const
+{
+  return (mi_type & (unsigned)t) == (unsigned)t;
+}
+
 void
 NdbEventImpl::setDurability(NdbDictionary::Event::EventDurability d)
 {

--- 1.46/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp	2006-02-05 19:09:00 +01:00
+++ 1.47/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp	2006-02-07 10:02:57 +01:00
@@ -281,6 +281,7 @@
   void setTable(const char * table);
   const char * getTableName() const;
   void addTableEvent(const NdbDictionary::Event::TableEvent t);
+  bool getTableEvent(const NdbDictionary::Event::TableEvent t) const;
   void setDurability(NdbDictionary::Event::EventDurability d);
   NdbDictionary::Event::EventDurability  getDurability() const;
   void setReport(NdbDictionary::Event::EventReport r);
Thread
bk commit into 5.1 tree (tomas:1.2074)tomas7 Feb