Below is the list of changes that have just been committed into a local
5.1 repository of marty. When marty 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.1910 05/09/13 13:19:44 mskold@stripped +4 -0
Added support for altering frm in NdbCluster (WL#1892)
storage/ndb/src/ndbapi/NdbDictionary.cpp
1.39 05/09/13 13:19:04 mskold@stripped +3 -3
Added support for altering frm in NdbCluster (WL#1892)
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
1.36 05/09/13 13:18:48 mskold@stripped +4 -0
Added support for altering frm in NdbCluster (WL#1892)
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
1.92 05/09/13 13:18:48 mskold@stripped +30 -1
Added support for altering frm in NdbCluster (WL#1892)
storage/ndb/include/kernel/signaldata/AlterTable.hpp
1.5 05/09/13 13:18:48 mskold@stripped +17 -1
Added support for altering frm in NdbCluster (WL#1892)
# 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: mskold
# Host: blowfish.ndb.mysql.com
# Root: /usr/local/home/marty/MySQL/mysql-5.1-opt
--- 1.4/storage/ndb/include/kernel/signaldata/AlterTable.hpp 2005-08-25 18:49:45 +02:00
+++ 1.5/storage/ndb/include/kernel/signaldata/AlterTable.hpp 2005-09-13 13:18:48 +02:00
@@ -62,18 +62,22 @@
/*
n = Changed name
+ f = Changed frm
1111111111222222222233
01234567890123456789012345678901
- n-------------------------------
+ nf------------------------------
*/
#define NAME_SHIFT (0)
+#define FRM_SHIFT (1)
/**
* Getters and setters
*/
static Uint8 getNameFlag(const UintR & changeMask);
static void setNameFlag(UintR & changeMask, Uint32 nameFlg);
+ static Uint8 getFrmFlag(const UintR & changeMask);
+ static void setFrmFlag(UintR & changeMask, Uint32 frmFlg);
};
inline
@@ -86,6 +90,18 @@
void
AlterTableReq::setNameFlag(UintR & changeMask, Uint32 nameFlg){
changeMask |= (nameFlg << NAME_SHIFT);
+}
+
+inline
+Uint8
+AlterTableReq::getFrmFlag(const UintR & changeMask){
+ return (Uint8)((changeMask >> FRM_SHIFT) & 1);
+}
+
+inline
+void
+AlterTableReq::setFrmFlag(UintR & changeMask, Uint32 frmFlg){
+ changeMask |= (frmFlg << FRM_SHIFT);
}
--- 1.38/storage/ndb/src/ndbapi/NdbDictionary.cpp 2005-07-18 13:30:24 +02:00
+++ 1.39/storage/ndb/src/ndbapi/NdbDictionary.cpp 2005-09-13 13:19:04 +02:00
@@ -399,17 +399,17 @@
const void*
NdbDictionary::Table::getFrmData() const {
- return m_impl.m_frm.get_data();
+ return m_impl.getFrmData();
}
Uint32
NdbDictionary::Table::getFrmLength() const {
- return m_impl.m_frm.length();
+ return m_impl.getFrmLength();
}
void
NdbDictionary::Table::setFrm(const void* data, Uint32 len){
- m_impl.m_frm.assign(data, len);
+ m_impl.setFrm(data, len);
}
const void*
--- 1.91/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2005-08-25 18:49:48 +02:00
+++ 1.92/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2005-09-13 13:18:48 +02:00
@@ -391,6 +391,7 @@
m_externalName.assign(org.m_externalName);
m_newExternalName.assign(org.m_newExternalName);
m_frm.assign(org.m_frm.get_data(), org.m_frm.length());
+ m_newFrm.assign(org.m_newFrm.get_data(), org.m_newFrm.length());
m_ng.assign(org.m_ng.get_data(), org.m_ng.length());
m_fragmentType = org.m_fragmentType;
m_fragmentCount = org.m_fragmentCount;
@@ -434,6 +435,28 @@
return m_newExternalName.c_str();
}
+void NdbTableImpl::setFrm(const void* data, Uint32 len)
+{
+ m_newFrm.assign(data, len);
+}
+
+const void *
+NdbTableImpl::getFrmData() const
+{
+ if (m_newFrm.empty())
+ return m_frm.get_data();
+ else
+ return m_newFrm.get_data();
+}
+
+Uint32
+NdbTableImpl::getFrmLength() const
+{
+ if (m_newFrm.empty())
+ return m_frm.length();
+ else
+ return m_newFrm.length();
+}
void
NdbTableImpl::buildColumnHash(){
@@ -1434,7 +1457,7 @@
impl->m_replicaCount = replicaCount;
impl->m_fragmentCount = fragCount;
DBUG_PRINT("info", ("replicaCount=%x , fragCount=%x",replicaCount,fragCount));
- for(i = 0; i<(fragCount*replicaCount); i++)
+ for(i = 0; i < (Uint32) (fragCount*replicaCount); i++)
{
impl->m_fragments.push_back(tableDesc.FragmentData[i+2]);
}
@@ -1609,9 +1632,15 @@
DBUG_RETURN(-1);
}
+ // Check if any changes for alter table
if (!impl.m_newExternalName.empty()) {
impl.m_externalName.assign(impl.m_newExternalName);
AlterTableReq::setNameFlag(impl.m_changeMask, true);
+ }
+
+ if (!impl.m_newFrm.empty()) {
+ impl.m_frm.assign(impl.m_newFrm.get_data(), impl.m_newFrm.length());
+ AlterTableReq::setFrmFlag(impl.m_changeMask, true);
}
//validate();
--- 1.35/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp 2005-07-18 13:30:24 +02:00
+++ 1.36/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp 2005-09-13 13:18:48 +02:00
@@ -102,6 +102,9 @@
void init();
void setName(const char * name);
const char * getName() const;
+ void setFrm(const void* data, Uint32 len);
+ const void * getFrmData() const;
+ Uint32 getFrmLength() const;
Uint32 m_changeMask;
Uint32 m_tableId;
@@ -110,6 +113,7 @@
BaseString m_externalName;
BaseString m_newExternalName; // Used for alter table
UtilBuffer m_frm;
+ UtilBuffer m_newFrm; // Used for alter table
UtilBuffer m_ng;
NdbDictionary::Object::FragmentType m_fragmentType;
| Thread |
|---|
| • bk commit into 5.1 tree (mskold:1.1910) | Martin Skold | 13 Sep |