Loading sql/sql_yacc.yy +1 −1 Original line number Diff line number Diff line Loading @@ -3215,9 +3215,9 @@ size_number: ulonglong number, test_number; uint text_shift_number= 0; longlong prefix_number; char *end_ptr; char *start_ptr= $1.str; uint str_len= strlen(start_ptr); char *end_ptr= start_ptr + str_len; int error; prefix_number= my_strtoll10(start_ptr, &end_ptr, &error); if ((start_ptr + str_len - 1) == end_ptr) Loading storage/ndb/include/kernel/signaldata/CreateTable.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,8 @@ public: InvalidTablespace = 755, VarsizeBitfieldNotSupported = 757, NotATablespace = 758, InvalidTablespaceVersion = 759 InvalidTablespaceVersion = 759, OutOfStringBuffer = 773 }; private: Loading storage/ndb/include/mgmapi/mgmapi_config_parameters.h +1 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ #define CFG_DB_MAX_OPEN_FILES 159 #define CFG_DB_DISK_PAGE_BUFFER_MEMORY 160 #define CFG_DB_STRING_MEMORY 161 #define CFG_NODE_ARBIT_RANK 200 #define CFG_NODE_ARBIT_DELAY 201 Loading storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +45 −12 Original line number Diff line number Diff line Loading @@ -2056,7 +2056,29 @@ void Dbdict::execREAD_CONFIG_REQ(Signal* signal) 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); Loading Loading @@ -5866,7 +5888,8 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it, { Rope name(c_rope_pool, tablePtr.p->tableName); ndbrequire(name.assign(c_tableDesc.TableName, tableNameLength, name_hash)); tabRequire(name.assign(c_tableDesc.tableDesc.TableName, tableNameLength, name_hash), CreateTableRef::OutOfStringBuffer); } Ptr<DictObject> obj_ptr; Loading Loading @@ -5907,16 +5930,20 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it, { Rope frm(c_rope_pool, tablePtr.p->frmData); ndbrequire(frm.assign(c_tableDesc.FrmData, c_tableDesc.FrmLen)); tabRequire(frm.assign(c_tableDesc.FrmData, c_tableDesc.FrmLen), CreateTableRef::OutOfStringBuffer); Rope range(c_rope_pool, tablePtr.p->rangeData); ndbrequire(range.assign(c_tableDesc.RangeListData, c_tableDesc.RangeListDataLen)); tabRequire(range.assign(c_tableDesc.RangeListData, c_tableDesc.RangeListDataLen), CreateTableRef::OutOfStringBuffer); Rope fd(c_rope_pool, tablePtr.p->ngData); ndbrequire(fd.assign((const char*)c_tableDesc.FragmentData, c_tableDesc.FragmentDataLen)); tabRequire(fd.assign((const char*)c_tableDesc.FragmentData, c_tableDesc.FragmentDataLen), CreateTableRef::OutOfStringBuffer); Rope ts(c_rope_pool, tablePtr.p->tsData); ndbrequire(ts.assign((const char*)c_tableDesc.TablespaceData, c_tableDesc.TablespaceDataLen)); tabRequire(ts.assign((const char*)c_tableDesc.TablespaceData, c_tableDesc.TablespaceDataLen), CreateTableRef::OutOfStringBuffer); } c_fragDataLen = c_tableDesc.FragmentDataLen; Loading Loading @@ -6031,7 +6058,13 @@ void Dbdict::handleTabInfo(SimpleProperties::Reader & it, */ { 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; Loading Loading @@ -14763,7 +14796,7 @@ Dbdict::create_fg_prepare_start(Signal* signal, SchemaOp* op){ { 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; break; } } Loading Loading @@ -15002,7 +15035,7 @@ Dbdict::create_file_prepare_start(Signal* signal, SchemaOp* op){ { 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; break; } } Loading storage/ndb/src/mgmsrv/ConfigInfo.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -1214,6 +1214,18 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { "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 ***************************************************************************/ Loading Loading
sql/sql_yacc.yy +1 −1 Original line number Diff line number Diff line Loading @@ -3215,9 +3215,9 @@ size_number: ulonglong number, test_number; uint text_shift_number= 0; longlong prefix_number; char *end_ptr; char *start_ptr= $1.str; uint str_len= strlen(start_ptr); char *end_ptr= start_ptr + str_len; int error; prefix_number= my_strtoll10(start_ptr, &end_ptr, &error); if ((start_ptr + str_len - 1) == end_ptr) Loading
storage/ndb/include/kernel/signaldata/CreateTable.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,8 @@ public: InvalidTablespace = 755, VarsizeBitfieldNotSupported = 757, NotATablespace = 758, InvalidTablespaceVersion = 759 InvalidTablespaceVersion = 759, OutOfStringBuffer = 773 }; private: Loading
storage/ndb/include/mgmapi/mgmapi_config_parameters.h +1 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ #define CFG_DB_MAX_OPEN_FILES 159 #define CFG_DB_DISK_PAGE_BUFFER_MEMORY 160 #define CFG_DB_STRING_MEMORY 161 #define CFG_NODE_ARBIT_RANK 200 #define CFG_NODE_ARBIT_DELAY 201 Loading
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +45 −12 Original line number Diff line number Diff line Loading @@ -2056,7 +2056,29 @@ void Dbdict::execREAD_CONFIG_REQ(Signal* signal) 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); Loading Loading @@ -5866,7 +5888,8 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it, { Rope name(c_rope_pool, tablePtr.p->tableName); ndbrequire(name.assign(c_tableDesc.TableName, tableNameLength, name_hash)); tabRequire(name.assign(c_tableDesc.tableDesc.TableName, tableNameLength, name_hash), CreateTableRef::OutOfStringBuffer); } Ptr<DictObject> obj_ptr; Loading Loading @@ -5907,16 +5930,20 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it, { Rope frm(c_rope_pool, tablePtr.p->frmData); ndbrequire(frm.assign(c_tableDesc.FrmData, c_tableDesc.FrmLen)); tabRequire(frm.assign(c_tableDesc.FrmData, c_tableDesc.FrmLen), CreateTableRef::OutOfStringBuffer); Rope range(c_rope_pool, tablePtr.p->rangeData); ndbrequire(range.assign(c_tableDesc.RangeListData, c_tableDesc.RangeListDataLen)); tabRequire(range.assign(c_tableDesc.RangeListData, c_tableDesc.RangeListDataLen), CreateTableRef::OutOfStringBuffer); Rope fd(c_rope_pool, tablePtr.p->ngData); ndbrequire(fd.assign((const char*)c_tableDesc.FragmentData, c_tableDesc.FragmentDataLen)); tabRequire(fd.assign((const char*)c_tableDesc.FragmentData, c_tableDesc.FragmentDataLen), CreateTableRef::OutOfStringBuffer); Rope ts(c_rope_pool, tablePtr.p->tsData); ndbrequire(ts.assign((const char*)c_tableDesc.TablespaceData, c_tableDesc.TablespaceDataLen)); tabRequire(ts.assign((const char*)c_tableDesc.TablespaceData, c_tableDesc.TablespaceDataLen), CreateTableRef::OutOfStringBuffer); } c_fragDataLen = c_tableDesc.FragmentDataLen; Loading Loading @@ -6031,7 +6058,13 @@ void Dbdict::handleTabInfo(SimpleProperties::Reader & it, */ { 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; Loading Loading @@ -14763,7 +14796,7 @@ Dbdict::create_fg_prepare_start(Signal* signal, SchemaOp* op){ { 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; break; } } Loading Loading @@ -15002,7 +15035,7 @@ Dbdict::create_file_prepare_start(Signal* signal, SchemaOp* op){ { 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; break; } } Loading
storage/ndb/src/mgmsrv/ConfigInfo.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -1214,6 +1214,18 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { "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 ***************************************************************************/ Loading