Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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.2229 06/06/28 08:47:43 jonas@stripped +14 -0
Merge perch.ndb.mysql.com:/home/jonas/src/51-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
1.15 06/06/28 08:47:40 jonas@stripped +0 -0
SCCS merged
storage/ndb/tools/restore/consumer_restore.cpp
1.33 06/06/28 08:41:32 jonas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/ndberror.c
1.67 06/06/28 08:41:32 jonas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
1.65 06/06/28 08:41:32 jonas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/NdbDictionary.cpp
1.61 06/06/28 08:41:32 jonas@stripped +0 -0
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp
1.79 06/06/28 08:41:32 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/suma/Suma.cpp
1.44 06/06/28 08:41:32 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
1.114 06/06/28 08:41:31 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
1.70 06/06/28 08:41:31 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
1.19 06/06/28 08:41:31 jonas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
1.93 06/06/28 08:41:31 jonas@stripped +0 -0
Auto merged
storage/ndb/include/ndbapi/NdbScanOperation.hpp
1.41 06/06/28 08:41:31 jonas@stripped +0 -0
Auto merged
storage/ndb/include/ndbapi/NdbDictionary.hpp
1.80 06/06/28 08:41:31 jonas@stripped +0 -0
Auto merged
sql/ha_ndbcluster.cc
1.341 06/06/28 08:41:31 jonas@stripped +0 -0
Auto merged
# 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: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/mysql-5.1-new/RESYNC
--- 1.79/storage/ndb/include/ndbapi/NdbDictionary.hpp 2006-06-26 15:08:06 +02:00
+++ 1.80/storage/ndb/include/ndbapi/NdbDictionary.hpp 2006-06-28 08:41:31 +02:00
@@ -831,13 +831,6 @@ public:
virtual int getObjectVersion() const;
/**
- * Set/Get Maximum number of rows in table (only used to calculate
- * number of partitions).
- */
- void setMaxRows(Uint64 maxRows);
- Uint64 getMaxRows() const;
-
- /**
* Set/Get indicator if default number of partitions is used in table.
*/
void setDefaultNoPartitionsFlag(Uint32 indicator);
@@ -887,6 +880,20 @@ public:
* Set table object type
*/
void setObjectType(Object::Type type);
+
+ /**
+ * Set/Get Maximum number of rows in table (only used to calculate
+ * number of partitions).
+ */
+ void setMaxRows(Uint64 maxRows);
+ Uint64 getMaxRows() const;
+
+ /**
+ * Set/Get Minimum number of rows in table (only used to calculate
+ * number of partitions).
+ */
+ void setMinRows(Uint64 minRows);
+ Uint64 getMinRows() const;
/** @} *******************************************************************/
--- 1.40/storage/ndb/include/ndbapi/NdbScanOperation.hpp 2006-06-17 11:04:11 +02:00
+++ 1.41/storage/ndb/include/ndbapi/NdbScanOperation.hpp 2006-06-28 08:41:31 +02:00
@@ -58,7 +58,9 @@ public:
*/
virtual
int readTuples(LockMode lock_mode = LM_Read,
- Uint32 scan_flags = 0, Uint32 parallel = 0);
+ Uint32 scan_flags = 0,
+ Uint32 parallel = 0,
+ Uint32 batch = 0);
#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
/**
--- 1.78/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2006-06-22 12:22:47 +02:00
+++ 1.79/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2006-06-28 08:41:32 +02:00
@@ -30,6 +30,7 @@ extern my_bool opt_core;
#define MAX_LINE_LENGTH 255
#define KEY_INTERNAL 0
#define MAX_INT_RNIL 0xfffffeff
+#define MAX_PORT_NO 65535
#define _STR_VALUE(x) #x
#define STR_VALUE(x) _STR_VALUE(x)
@@ -422,7 +423,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
ConfigInfo::CI_INT,
UNDEFINED,
"1",
- STR_VALUE(MAX_INT_RNIL) },
+ STR_VALUE(MAX_PORT_NO) },
{
CFG_DB_NO_REPLICAS,
@@ -1510,7 +1511,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
ConfigInfo::CI_INT,
NDB_PORT,
"0",
- STR_VALUE(MAX_INT_RNIL) },
+ STR_VALUE(MAX_PORT_NO) },
{
KEY_INTERNAL,
@@ -1522,7 +1523,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
ConfigInfo::CI_INT,
UNDEFINED,
"0",
- STR_VALUE(MAX_INT_RNIL) },
+ STR_VALUE(MAX_PORT_NO) },
{
CFG_NODE_ARBIT_RANK,
@@ -1664,7 +1665,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
ConfigInfo::CI_INT,
MANDATORY,
"0",
- STR_VALUE(MAX_INT_RNIL) },
+ STR_VALUE(MAX_PORT_NO) },
{
CFG_TCP_SEND_BUFFER_SIZE,
@@ -1770,7 +1771,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
ConfigInfo::CI_INT,
MANDATORY,
"0",
- STR_VALUE(MAX_INT_RNIL) },
+ STR_VALUE(MAX_PORT_NO) },
{
CFG_SHM_SIGNUM,
@@ -1992,7 +1993,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
ConfigInfo::CI_INT,
MANDATORY,
"0",
- STR_VALUE(MAX_INT_RNIL) },
+ STR_VALUE(MAX_PORT_NO) },
{
CFG_SCI_HOST1_ID_0,
--- 1.92/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2006-06-27 13:12:24 +02:00
+++ 1.93/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2006-06-28 08:41:31 +02:00
@@ -9537,7 +9537,14 @@ Dbdict::createEventComplete_RT_USER_GET(
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
RequestTracker & p = evntRecPtr.p->m_reqTracker;
- p.init<CreateEvntRef>(c_counterMgr, rg, GSN_CREATE_EVNT_REF, evntRecPtr.i);
+ if (!p.init<CreateEvntRef>(c_counterMgr, rg, GSN_CREATE_EVNT_REF,
+ evntRecPtr.i))
+ {
+ jam();
+ evntRecPtr.p->m_errorCode = 701;
+ createEvent_sendReply(signal, evntRecPtr);
+ return;
+ }
sendSignal(rg, GSN_CREATE_EVNT_REQ, signal, CreateEvntReq::SignalLength, JBB);
}
@@ -9825,8 +9832,12 @@ void Dbdict::execSUB_START_REQ(Signal* s
return;
}
OpSubEventPtr subbPtr;
+ Uint32 errCode = 0;
if (!c_opSubEvent.seize(subbPtr)) {
+ errCode = SubStartRef::Busy;
+busy:
SubStartRef * ref = (SubStartRef *)signal->getDataPtrSend();
+
{ // fix
Uint32 subcriberRef = ((SubStartReq*)signal->getDataPtr())->subscriberRef;
ref->subscriberRef = subcriberRef;
@@ -9836,7 +9847,7 @@ void Dbdict::execSUB_START_REQ(Signal* s
// ret->setErrorLine(__LINE__);
// ret->setErrorNode(reference());
ref->senderRef = reference();
- ref->errorCode = SubStartRef::Busy;
+ ref->errorCode = errCode;
sendSignal(origSenderRef, GSN_SUB_START_REF, signal,
SubStartRef::SignalLength2, JBB);
@@ -9859,7 +9870,12 @@ void Dbdict::execSUB_START_REQ(Signal* s
subbPtr.p->m_senderRef = origSenderRef; // not sure if API sets correctly
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
RequestTracker & p = subbPtr.p->m_reqTracker;
- p.init<SubStartRef>(c_counterMgr, rg, GSN_SUB_START_REF, subbPtr.i);
+ if (!p.init<SubStartRef>(c_counterMgr, rg, GSN_SUB_START_REF, subbPtr.i))
+ {
+ c_opSubEvent.release(subbPtr);
+ errCode = SubStartRef::Busy;
+ goto busy;
+ }
SubStartReq* req = (SubStartReq*) signal->getDataPtrSend();
@@ -10049,14 +10065,17 @@ void Dbdict::execSUB_STOP_REQ(Signal* si
return;
}
OpSubEventPtr subbPtr;
+ Uint32 errCode = 0;
if (!c_opSubEvent.seize(subbPtr)) {
+ errCode = SubStopRef::Busy;
+busy:
SubStopRef * ref = (SubStopRef *)signal->getDataPtrSend();
jam();
// ret->setErrorCode(SubStartRef::SeizeError);
// ret->setErrorLine(__LINE__);
// ret->setErrorNode(reference());
ref->senderRef = reference();
- ref->errorCode = SubStopRef::Busy;
+ ref->errorCode = errCode;
sendSignal(origSenderRef, GSN_SUB_STOP_REF, signal,
SubStopRef::SignalLength, JBB);
@@ -10081,10 +10100,16 @@ void Dbdict::execSUB_STOP_REQ(Signal* si
subbPtr.p->m_senderRef = origSenderRef; // not sure if API sets correctly
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
RequestTracker & p = subbPtr.p->m_reqTracker;
- p.init<SubStopRef>(c_counterMgr, rg, GSN_SUB_STOP_REF, subbPtr.i);
-
+ if (!p.init<SubStopRef>(c_counterMgr, rg, GSN_SUB_STOP_REF, subbPtr.i))
+ {
+ jam();
+ c_opSubEvent.release(subbPtr);
+ errCode = SubStopRef::Busy;
+ goto busy;
+ }
+
SubStopReq* req = (SubStopReq*) signal->getDataPtrSend();
-
+
req->senderRef = reference();
req->senderData = subbPtr.i;
@@ -10374,9 +10399,14 @@ Dbdict::dropEventUTIL_EXECUTE_READ(Signa
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
RequestTracker & p = evntRecPtr.p->m_reqTracker;
- p.init<SubRemoveRef>(c_counterMgr, rg, GSN_SUB_REMOVE_REF,
- evntRecPtr.i);
-
+ if (!p.init<SubRemoveRef>(c_counterMgr, rg, GSN_SUB_REMOVE_REF,
+ evntRecPtr.i))
+ {
+ evntRecPtr.p->m_errorCode = 701;
+ dropEvent_sendReply(signal, evntRecPtr);
+ return;
+ }
+
SubRemoveReq* req = (SubRemoveReq*) signal->getDataPtrSend();
req->senderRef = reference();
@@ -15481,6 +15511,17 @@ Dbdict::create_file_prepare_start(Signal
if(get_object(f.FileName, len, hash) != 0){
op->m_errorCode = CreateFileRef::FilenameAlreadyExists;
break;
+ }
+
+ {
+ Uint32 dl;
+ const ndb_mgm_configuration_iterator * p =
+ m_ctx.m_config.getOwnConfigIterator();
+ if(!ndb_mgm_get_int_parameter(p, CFG_DB_DISCLESS, &dl) && dl)
+ {
+ op->m_errorCode = CreateFileRef::NotSupportedWhenDiskless;
+ break;
+ }
}
// Loop through all filenames...
--- 1.18/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2006-06-15 14:34:30 +02:00
+++ 1.19/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2006-06-28 08:41:31 +02:00
@@ -683,6 +683,7 @@ private:
void execGETGCIREQ(Signal *);
void execDIH_RESTARTREQ(Signal *);
void execSTART_RECCONF(Signal *);
+ void execSTART_FRAGREF(Signal *);
void execSTART_FRAGCONF(Signal *);
void execADD_FRAGCONF(Signal *);
void execADD_FRAGREF(Signal *);
--- 1.14/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp 2006-06-15 14:38:44 +02:00
+++ 1.15/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp 2006-06-28 08:47:40 +02:00
@@ -257,6 +257,9 @@ Dbdih::Dbdih(Block_context& ctx):
addRecSignal(GSN_DICT_LOCK_CONF, &Dbdih::execDICT_LOCK_CONF);
addRecSignal(GSN_DICT_LOCK_REF, &Dbdih::execDICT_LOCK_REF);
+ addRecSignal(GSN_START_FRAGREF,
+ &Dbdih::execSTART_FRAGREF);
+
apiConnectRecord = 0;
connectRecord = 0;
fileRecord = 0;
--- 1.69/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2006-06-27 22:27:15 +02:00
+++ 1.70/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2006-06-28 08:41:31 +02:00
@@ -1107,6 +1107,26 @@ void Dbdih::execSTART_FRAGCONF(Signal* s
return;
}//Dbdih::execSTART_FRAGCONF()
+void Dbdih::execSTART_FRAGREF(Signal* signal)
+{
+ jamEntry();
+
+ /**
+ * Kill starting node
+ */
+ Uint32 errCode = signal->theData[1];
+ Uint32 nodeId = signal->theData[2];
+
+ SystemError * const sysErr = (SystemError*)&signal->theData[0];
+ sysErr->errorCode = SystemError::StartFragRefError;
+ sysErr->errorRef = reference();
+ sysErr->data1 = errCode;
+ sysErr->data2 = 0;
+ sendSignal(calcNdbCntrBlockRef(nodeId), GSN_SYSTEM_ERROR, signal,
+ SystemError::SignalLength, JBB);
+ return;
+}//Dbdih::execSTART_FRAGCONF()
+
void Dbdih::execSTART_MEREF(Signal* signal)
{
jamEntry();
--- 1.113/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2006-06-27 13:12:24 +02:00
+++ 1.114/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2006-06-28 08:41:31 +02:00
@@ -8073,15 +8073,15 @@ void Dblqh::scanLockReleasedLab(Signal*
scanptr.p->m_curr_batch_size_rows = 0;
scanptr.p->m_curr_batch_size_bytes = 0;
closeScanLab(signal);
+ } else if (scanptr.p->m_last_row && !scanptr.p->scanLockHold) {
+ jam();
+ closeScanLab(signal);
+ return;
} else if (scanptr.p->check_scan_batch_completed() &&
scanptr.p->scanLockHold != ZTRUE) {
jam();
scanptr.p->scanState = ScanRecord::WAIT_SCAN_NEXTREQ;
sendScanFragConf(signal, ZFALSE);
- } else if (scanptr.p->m_last_row && !scanptr.p->scanLockHold) {
- jam();
- closeScanLab(signal);
- return;
} else {
jam();
/*
--- 1.43/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2006-06-20 15:45:06 +02:00
+++ 1.44/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2006-06-28 08:41:32 +02:00
@@ -2480,7 +2480,8 @@ Suma::execSUB_STOP_REQ(Signal* signal){
TablePtr tabPtr;
tabPtr.i = subPtr.p->m_table_ptrI;
- if (!(tabPtr.p = c_tables.getPtr(tabPtr.i)) ||
+ if (tabPtr.i == RNIL ||
+ !(tabPtr.p = c_tables.getPtr(tabPtr.i)) ||
tabPtr.p->m_tableId != subPtr.p->m_tableId)
{
jam();
--- 1.60/storage/ndb/src/ndbapi/NdbDictionary.cpp 2006-06-26 15:08:06 +02:00
+++ 1.61/storage/ndb/src/ndbapi/NdbDictionary.cpp 2006-06-28 08:41:32 +02:00
@@ -452,6 +452,18 @@ NdbDictionary::Table::getMaxRows() const
}
void
+NdbDictionary::Table::setMinRows(Uint64 minRows)
+{
+ m_impl.m_min_rows = minRows;
+}
+
+Uint64
+NdbDictionary::Table::getMinRows() const
+{
+ return m_impl.m_min_rows;
+}
+
+void
NdbDictionary::Table::setDefaultNoPartitionsFlag(Uint32 flag)
{
m_impl.m_default_no_part_flag = flag;;
--- 1.64/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp 2006-06-27 11:22:36 +02:00
+++ 1.65/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp 2006-06-28 08:41:32 +02:00
@@ -46,14 +46,22 @@ public:
NdbDictionary::Object::Status m_status;
bool change();
+
+ static NdbDictObjectImpl & getImpl(NdbDictionary::ObjectId & t) {
+ return t.m_impl;
+ }
+ static const NdbDictObjectImpl & getImpl(const NdbDictionary::ObjectId & t){
+ return t.m_impl;
+ }
+
protected:
+ friend class NdbDictionary::ObjectId;
+
NdbDictObjectImpl(NdbDictionary::Object::Type type) :
m_type(type),
m_status(NdbDictionary::Object::New) {
m_id = -1;
}
-
- friend class NdbDictionary::ObjectId;
};
/**
--- 1.340/sql/ha_ndbcluster.cc 2006-06-27 22:19:17 +02:00
+++ 1.341/sql/ha_ndbcluster.cc 2006-06-28 08:41:31 +02:00
@@ -10006,7 +10006,7 @@ int ndbcluster_alter_tablespace(THD* thd
}
NdbError err;
- NDBDICT *dict = ndb->getDictionary();
+ NDBDICT *dict= ndb->getDictionary();
int error;
const char * errmsg;
LINT_INIT(errmsg);
@@ -10070,9 +10070,12 @@ int ndbcluster_alter_tablespace(THD* thd
}
else if(info->ts_alter_tablespace_type == ALTER_TABLESPACE_DROP_FILE)
{
- NdbDictionary::Datafile df = dict->getDatafile(0,
- info->data_file_name);
- if (strcmp(df.getPath(), info->data_file_name) == 0)
+ NdbDictionary::Tablespace ts= dict->getTablespace(info->tablespace_name);
+ NdbDictionary::Datafile df= dict->getDatafile(0, info->data_file_name);
+ NdbDictionary::ObjectId objid;
+ df.getTablespaceId(&objid);
+ if (ts.getObjectId() == objid.getObjectId() &&
+ strcmp(df.getPath(), info->data_file_name) == 0)
{
errmsg= " DROP DATAFILE";
if (dict->dropDatafile(df))
@@ -10401,10 +10404,12 @@ static int ndbcluster_fill_files_table(T
table->field[c++]->set_null(); // TABLE_NAME
// LOGFILE_GROUP_NAME
+ NdbDictionary::ObjectId objid;
+ uf.getLogfileGroupId(&objid);
table->field[c++]->store(uf.getLogfileGroup(),
strlen(uf.getLogfileGroup()),
system_charset_info);
- table->field[c++]->store(uf.getLogfileGroupId()); // LOGFILE_GROUP_NUMBER
+ table->field[c++]->store(objid.getObjectId()); // LOGFILE_GROUP_NUMBER
table->field[c++]->store(ndbcluster_hton_name,
ndbcluster_hton_name_length,
system_charset_info); // ENGINE
--- 1.66/storage/ndb/src/ndbapi/ndberror.c 2006-06-26 16:47:24 +02:00
+++ 1.67/storage/ndb/src/ndbapi/ndberror.c 2006-06-28 08:41:32 +02:00
@@ -420,6 +420,7 @@ ErrorBundle ErrorCodes[] = {
{ 1514, DMEC, SE, "Currently there is a limit of one logfile group" },
{ 773, DMEC, SE, "Out of string memory, please modify StringMemory config parameter" },
+ { 775, DMEC, SE, "Create file is not supported when Diskless=1" },
/**
* FunctionNotImplemented
--- 1.32/storage/ndb/tools/restore/consumer_restore.cpp 2006-06-26 15:08:06 +02:00
+++ 1.33/storage/ndb/tools/restore/consumer_restore.cpp 2006-06-28 08:41:32 +02:00
@@ -712,6 +712,16 @@ BackupRestore::table(const TableS & tabl
copy.setFragmentData((const void *)ng_array, no_parts << 1);
}
+ /*
+ update min and max rows to reflect the table, this to
+ ensure that memory is allocated properly in the ndb kernel
+ */
+ copy.setMinRows(table.getNoOfRecords());
+ if (table.getNoOfRecords() > copy.getMaxRows())
+ {
+ copy.setMaxRows(table.getNoOfRecords());
+ }
+
if (dict->createTable(copy) == -1)
{
err << "Create table " << table.getTableName() << " failed: "
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2229) | jonas | 28 Jun |