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.1972 06/01/19 14:08:05 jonas@stripped +5 -0
bug#16455 - ndb crash when running of of rope pool
storage/ndb/src/ndbapi/ndberror.c
1.46 06/01/19 14:08:02 jonas@stripped +2 -1
New error code for rope pool
storage/ndb/src/mgmsrv/ConfigInfo.cpp
1.71 06/01/19 14:08:02 jonas@stripped +12 -0
New error code for rope pool
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
1.63 06/01/19 14:08:02 jonas@stripped +36 -6
New error code for rope pool
storage/ndb/include/mgmapi/mgmapi_config_parameters.h
1.23 06/01/19 14:08:02 jonas@stripped +2 -0
New error code for rope pool
storage/ndb/include/kernel/signaldata/CreateTable.hpp
1.6 06/01/19 14:08:02 jonas@stripped +2 -1
New error code for rope pool
# 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.4
--- 1.22/storage/ndb/include/mgmapi/mgmapi_config_parameters.h 2005-11-04 21:09:58 +01:00
+++ 1.23/storage/ndb/include/mgmapi/mgmapi_config_parameters.h 2006-01-19 14:08:02 +01:00
@@ -85,6 +85,8 @@
#define CFG_DB_MAX_OPEN_FILES 159
+#define CFG_DB_STRING_MEMORY 161
+
#define CFG_NODE_ARBIT_RANK 200
#define CFG_NODE_ARBIT_DELAY 201
--- 1.5/storage/ndb/include/kernel/signaldata/CreateTable.hpp 2005-11-07 12:19:05 +01:00
+++ 1.6/storage/ndb/include/kernel/signaldata/CreateTable.hpp 2006-01-19 14:08:02 +01:00
@@ -95,7 +95,8 @@
InvalidTablespace = 755,
VarsizeBitfieldNotSupported = 757,
NotATablespace = 758,
- InvalidTablespaceVersion = 759
+ InvalidTablespaceVersion = 759,
+ OutOfStringBuffer = 773
};
private:
--- 1.70/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2005-11-04 21:09:59 +01:00
+++ 1.71/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2006-01-19 14:08:02 +01:00
@@ -1202,6 +1202,18 @@
"0",
STR_VALUE(MAX_INT_RNIL) },
+ {
+ CFG_DB_STRING_MEMORY,
+ "StringMemory",
+ DB_TOKEN,
+ "Default size of string memory (0 -> 5% of max 1-100 -> %of max, >100 -> actual bytes)",
+ ConfigInfo::CI_USED,
+ false,
+ ConfigInfo::CI_INT,
+ "0",
+ "0",
+ STR_VALUE(MAX_INT_RNIL) },
+
/***************************************************************************
* API
***************************************************************************/
--- 1.62/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2005-12-02 20:07:08 +01:00
+++ 1.63/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2006-01-19 14:08:02 +01:00
@@ -2016,8 +2016,30 @@
c_schemaOp.setSize(8);
//c_opDropObj.setSize(8);
c_Trans.setSize(8);
- c_rope_pool.setSize(100000/28);
+ Uint32 rps = 0;
+ rps += tablerecSize * (MAX_TAB_NAME_SIZE + MAX_FRM_DATA_SIZE);
+ rps += attributesize * (MAX_ATTR_NAME_SIZE + MAX_ATTR_DEFAULT_VALUE_SIZE);
+ rps += c_maxNoOfTriggers * MAX_TAB_NAME_SIZE;
+ rps += (10 + 10) * MAX_TAB_NAME_SIZE;
+
+ Uint32 sm = 5;
+ ndb_mgm_get_int_parameter(p, CFG_DB_STRING_MEMORY, &sm);
+ if (sm == 0)
+ sm = 5;
+
+ Uint32 sb = 0;
+ if (sm < 100)
+ {
+ sb = (rps * sm) / 100;
+ }
+ else
+ {
+ sb = sm;
+ }
+
+ c_rope_pool.setSize(sb/28 + 100);
+
// Initialize BAT for interface to file system
NewVARIABLE* bat = allocateBat(2);
bat[0].WA = &c_schemaPageRecordArray.getPtr(0)->word[0];
@@ -5795,7 +5817,8 @@
{
Rope name(c_rope_pool, tablePtr.p->tableName);
- ndbrequire(name.assign(tableDesc.TableName, tableNameLength, name_hash));
+ tabRequire(name.assign(tableDesc.TableName, tableNameLength, name_hash),
+ CreateTableRef::OutOfStringBuffer);
}
Ptr<DictObject> obj_ptr;
@@ -5827,7 +5850,8 @@
{
Rope frm(c_rope_pool, tablePtr.p->frmData);
- ndbrequire(frm.assign(tableDesc.FrmData, tableDesc.FrmLen));
+ tabRequire(frm.assign(tableDesc.FrmData, tableDesc.FrmLen),
+ CreateTableRef::OutOfStringBuffer);
}
tablePtr.p->ngLen = tableDesc.FragmentDataLen;
@@ -5942,7 +5966,13 @@
*/
{
Rope name(c_rope_pool, attrPtr.p->attributeName);
- name.assign(attrDesc.AttributeName, len, name_hash);
+ if (!name.assign(attrDesc.AttributeName, len, name_hash))
+ {
+ jam();
+ parseP->errorCode = CreateTableRef::OutOfStringBuffer;
+ parseP->errorLine = __LINE__;
+ return;
+ }
}
attrPtr.p->attributeId = i;
//attrPtr.p->attributeId = attrDesc.AttributeId;
@@ -14568,7 +14598,7 @@
{
Rope name(c_rope_pool, obj_ptr.p->m_name);
if(!name.assign(fg.FilegroupName, len, hash)){
- op->m_errorCode = CreateTableRef::TableNameTooLong;
+ op->m_errorCode = CreateTableRef::OutOfStringBuffer;
c_obj_pool.release(obj_ptr);
c_filegroup_pool.release(fg_ptr);
break;
@@ -14774,7 +14804,7 @@
{
Rope name(c_rope_pool, obj_ptr.p->m_name);
if(!name.assign(f.FileName, len, hash)){
- op->m_errorCode = CreateTableRef::TableNameTooLong;
+ op->m_errorCode = CreateTableRef::OutOfStringBuffer;
c_obj_pool.release(obj_ptr);
c_file_pool.release(filePtr);
break;
--- 1.45/storage/ndb/src/ndbapi/ndberror.c 2005-12-14 11:06:38 +01:00
+++ 1.46/storage/ndb/src/ndbapi/ndberror.c 2006-01-19 14:08:02 +01:00
@@ -391,7 +391,8 @@
{ 1229, DMEC, SE, "Too long frm data supplied" },
{ 1231, DMEC, SE, "Invalid table or index to scan" },
{ 1232, DMEC, SE, "Invalid table or index to scan" },
-
+ { 773, DMEC, SE, "Out of string memory, please modify StringMemory config parameter" },
+
/**
* FunctionNotImplemented
*/
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.1972) BUG#16455 | jonas | 19 Jan |