Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6f2724a2
Commit
6f2724a2
authored
Nov 13, 2006
by
Justin.He/justin.he@dev3-47.dev.cn.tlan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#19203, Different error reports for similar cases - unable allocate memory
parent
c10719c6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
8 deletions
+20
-8
storage/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
storage/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
+2
-1
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
+5
-2
storage/ndb/src/kernel/vm/ArrayPool.hpp
storage/ndb/src/kernel/vm/ArrayPool.hpp
+1
-1
storage/ndb/src/kernel/vm/SimulatedBlock.cpp
storage/ndb/src/kernel/vm/SimulatedBlock.cpp
+11
-3
storage/ndb/src/kernel/vm/SimulatedBlock.hpp
storage/ndb/src/kernel/vm/SimulatedBlock.hpp
+1
-1
No files found.
storage/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
View file @
6f2724a2
...
...
@@ -51,7 +51,8 @@ void Dbacc::initRecords()
page8
=
(
Page8
*
)
allocRecord
(
"Page8"
,
sizeof
(
Page8
),
cpagesize
,
false
);
false
,
CFG_DB_INDEX_MEM
);
operationrec
=
(
Operationrec
*
)
allocRecord
(
"Operationrec"
,
sizeof
(
Operationrec
),
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
View file @
6f2724a2
...
...
@@ -342,6 +342,7 @@ void Dbtup::initRecords()
{
unsigned
i
;
Uint32
tmp
;
Uint32
tmp1
=
0
;
const
ndb_mgm_configuration_iterator
*
p
=
m_ctx
.
m_config
.
getOwnConfigIterator
();
ndbrequire
(
p
!=
0
);
...
...
@@ -349,7 +350,7 @@ void Dbtup::initRecords()
ndbrequire
(
!
ndb_mgm_get_int_parameter
(
p
,
CFG_TUP_PAGE
,
&
tmp
));
// Records with dynamic sizes
Page
*
ptr
=
(
Page
*
)
allocRecord
(
"Page"
,
sizeof
(
Page
),
tmp
,
false
);
Page
*
ptr
=
(
Page
*
)
allocRecord
(
"Page"
,
sizeof
(
Page
),
tmp
,
false
,
CFG_DB_DATA_MEM
);
c_page_pool
.
set
(
ptr
,
tmp
);
attrbufrec
=
(
Attrbufrec
*
)
allocRecord
(
"Attrbufrec"
,
...
...
@@ -373,7 +374,9 @@ void Dbtup::initRecords()
cnoOfTabDescrRec
);
ndbrequire
(
!
ndb_mgm_get_int_parameter
(
p
,
CFG_TUP_OP_RECS
,
&
tmp
));
c_operation_pool
.
setSize
(
tmp
);
ndb_mgm_get_int_parameter
(
p
,
CFG_DB_NO_LOCAL_OPS
,
&
tmp1
);
c_operation_pool
.
setSize
(
tmp
,
false
,
true
,
true
,
tmp1
==
0
?
CFG_DB_NO_OPS
:
CFG_DB_NO_LOCAL_OPS
);
pageRange
=
(
PageRange
*
)
allocRecord
(
"PageRange"
,
sizeof
(
PageRange
),
...
...
storage/ndb/src/kernel/vm/ArrayPool.hpp
View file @
6f2724a2
...
...
@@ -257,7 +257,7 @@ ArrayPool<T>::setSize(Uint32 noOfElements,
if
(
0
!=
paramId
&&
0
==
ndb_mgm_get_db_parameter_info
(
paramId
,
&
param_info
,
&
size
))
{
BaseString
::
snprintf
(
errmsg
,
sizeof
(
errmsg
),
"
ArrayPool<T>::setSize malloc paramete
r %s failed"
,
param_info
.
m_name
);
"
Malloc memory fo
r %s failed"
,
param_info
.
m_name
);
}
ErrorReporter
::
handleAssert
(
errmsg
,
...
...
storage/ndb/src/kernel/vm/SimulatedBlock.cpp
View file @
6f2724a2
...
...
@@ -657,7 +657,7 @@ SimulatedBlock::getBatSize(Uint16 blockNo){
}
void
*
SimulatedBlock
::
allocRecord
(
const
char
*
type
,
size_t
s
,
size_t
n
,
bool
clear
)
SimulatedBlock
::
allocRecord
(
const
char
*
type
,
size_t
s
,
size_t
n
,
bool
clear
,
Uint32
paramId
)
{
void
*
p
=
NULL
;
...
...
@@ -678,8 +678,16 @@ SimulatedBlock::allocRecord(const char * type, size_t s, size_t n, bool clear)
if
(
p
==
NULL
){
char
buf1
[
255
];
char
buf2
[
255
];
BaseString
::
snprintf
(
buf1
,
sizeof
(
buf1
),
"%s could not allocate memory for %s"
,
getBlockName
(
number
()),
type
);
struct
ndb_mgm_param_info
param_info
;
size_t
size
=
sizeof
(
ndb_mgm_param_info
);
if
(
0
!=
paramId
&&
0
==
ndb_mgm_get_db_parameter_info
(
paramId
,
&
param_info
,
&
size
))
{
BaseString
::
snprintf
(
buf1
,
sizeof
(
buf1
),
"%s could not allocate memory for parameter %s"
,
getBlockName
(
number
()),
param_info
.
m_name
);
}
else
{
BaseString
::
snprintf
(
buf1
,
sizeof
(
buf1
),
"%s could not allocate memory for %s"
,
getBlockName
(
number
()),
type
);
}
BaseString
::
snprintf
(
buf2
,
sizeof
(
buf2
),
"Requested: %ux%u = %llu bytes"
,
(
Uint32
)
s
,
(
Uint32
)
n
,
(
Uint64
)
real_size
);
ERROR_SET
(
fatal
,
NDBD_EXIT_MEMALLOC
,
buf1
,
buf2
);
...
...
storage/ndb/src/kernel/vm/SimulatedBlock.hpp
View file @
6f2724a2
...
...
@@ -377,7 +377,7 @@ protected:
* Allocates memory for the datastructures where ndb keeps the data
*
*/
void
*
allocRecord
(
const
char
*
type
,
size_t
s
,
size_t
n
,
bool
clear
=
true
);
void
*
allocRecord
(
const
char
*
type
,
size_t
s
,
size_t
n
,
bool
clear
=
true
,
Uint32
paramId
=
0
);
/**
* Deallocate record
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment