mirror of
https://github.com/MariaDB/server.git
synced 2025-11-19 19:03:26 +03:00
MySQL Bugs: #16925: ndb, added additional getters on NdbDictionary::Event
This commit is contained in:
@@ -922,24 +922,7 @@ int NdbDictionary::Event::getNoOfEventColumns() const
|
|||||||
const NdbDictionary::Column *
|
const NdbDictionary::Column *
|
||||||
NdbDictionary::Event::getEventColumn(unsigned no) const
|
NdbDictionary::Event::getEventColumn(unsigned no) const
|
||||||
{
|
{
|
||||||
if (m_impl.m_columns.size())
|
return m_impl.getEventColumn(no);
|
||||||
{
|
|
||||||
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)
|
void NdbDictionary::Event::mergeEvents(bool flag)
|
||||||
|
|||||||
@@ -1178,6 +1178,29 @@ int NdbEventImpl::getNoOfEventColumns() const
|
|||||||
return m_attrIds.size() + m_columns.size();
|
return m_attrIds.size() + m_columns.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const NdbDictionary::Column *
|
||||||
|
NdbEventImpl::getEventColumn(unsigned no) const
|
||||||
|
{
|
||||||
|
if (m_columns.size())
|
||||||
|
{
|
||||||
|
if (no < m_columns.size())
|
||||||
|
{
|
||||||
|
return m_columns[no];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (m_attrIds.size())
|
||||||
|
{
|
||||||
|
if (no < m_attrIds.size())
|
||||||
|
{
|
||||||
|
NdbTableImpl* tab= m_tableImpl;
|
||||||
|
if (tab == 0)
|
||||||
|
return 0;
|
||||||
|
return tab->getColumn(m_attrIds[no]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NdbDictionaryImpl
|
* NdbDictionaryImpl
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -287,6 +287,7 @@ public:
|
|||||||
void setReport(NdbDictionary::Event::EventReport r);
|
void setReport(NdbDictionary::Event::EventReport r);
|
||||||
NdbDictionary::Event::EventReport getReport() const;
|
NdbDictionary::Event::EventReport getReport() const;
|
||||||
int getNoOfEventColumns() const;
|
int getNoOfEventColumns() const;
|
||||||
|
const NdbDictionary::Column * getEventColumn(unsigned no) const;
|
||||||
|
|
||||||
void print() {
|
void print() {
|
||||||
ndbout_c("NdbEventImpl: id=%d, key=%d",
|
ndbout_c("NdbEventImpl: id=%d, key=%d",
|
||||||
|
|||||||
Reference in New Issue
Block a user