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
fbcba851
Commit
fbcba851
authored
Nov 02, 2006
by
lzhou/root@dev3-138.dev.cn.tlan
Browse files
Options
Browse Files
Download
Plain Diff
Merge dev3-138.dev.cn.tlan:/home/zhl/mysql/mysql-4.1/bug19352
into dev3-138.dev.cn.tlan:/home/zhl/mysql/mysql-5.0/bug19352
parents
97515d24
2f6df585
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
ndb/src/kernel/vm/SimulatedBlock.cpp
ndb/src/kernel/vm/SimulatedBlock.cpp
+8
-6
No files found.
ndb/src/kernel/vm/SimulatedBlock.cpp
View file @
fbcba851
...
@@ -658,24 +658,26 @@ SimulatedBlock::allocRecord(const char * type, size_t s, size_t n, bool clear)
...
@@ -658,24 +658,26 @@ SimulatedBlock::allocRecord(const char * type, size_t s, size_t n, bool clear)
void
*
p
=
NULL
;
void
*
p
=
NULL
;
size_t
size
=
n
*
s
;
size_t
size
=
n
*
s
;
Uint64
real_size
=
(
Uint64
)((
Uint64
)
n
)
*
((
Uint64
)
s
);
refresh_watch_dog
();
refresh_watch_dog
();
if
(
size
>
0
){
if
(
real_
size
>
0
){
#ifdef VM_TRACE_MEM
#ifdef VM_TRACE_MEM
ndbout_c
(
"%s::allocRecord(%s, %u, %u) = %u bytes"
,
ndbout_c
(
"%s::allocRecord(%s, %u, %u) = %
ll
u bytes"
,
getBlockName
(
number
()),
getBlockName
(
number
()),
type
,
type
,
s
,
s
,
n
,
n
,
size
);
real_
size
);
#endif
#endif
if
(
real_size
==
(
Uint64
)
size
)
p
=
ndbd_malloc
(
size
);
p
=
ndbd_malloc
(
size
);
if
(
p
==
NULL
){
if
(
p
==
NULL
){
char
buf1
[
255
];
char
buf1
[
255
];
char
buf2
[
255
];
char
buf2
[
255
];
BaseString
::
snprintf
(
buf1
,
sizeof
(
buf1
),
"%s could not allocate memory for %s"
,
BaseString
::
snprintf
(
buf1
,
sizeof
(
buf1
),
"%s could not allocate memory for %s"
,
getBlockName
(
number
()),
type
);
getBlockName
(
number
()),
type
);
BaseString
::
snprintf
(
buf2
,
sizeof
(
buf2
),
"Requested: %ux%u = %u bytes"
,
BaseString
::
snprintf
(
buf2
,
sizeof
(
buf2
),
"Requested: %ux%u = %
ll
u bytes"
,
(
Uint32
)
s
,
(
Uint32
)
n
,
(
Uint
32
)
size
);
(
Uint32
)
s
,
(
Uint32
)
n
,
(
Uint
64
)
real_
size
);
ERROR_SET
(
fatal
,
NDBD_EXIT_MEMALLOC
,
buf1
,
buf2
);
ERROR_SET
(
fatal
,
NDBD_EXIT_MEMALLOC
,
buf1
,
buf2
);
}
}
...
...
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