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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
b5eddef1
Commit
b5eddef1
authored
Jun 13, 2005
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - valgrind fixes
parent
c199d7fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+6
-1
ndb/test/ndbapi/testBlobs.cpp
ndb/test/ndbapi/testBlobs.cpp
+3
-2
No files found.
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
b5eddef1
...
...
@@ -1004,6 +1004,11 @@ NdbDictInterface::getTable(const char * name, bool fullyQualifiedNames)
return
0
;
}
// avoid alignment problem and memory overrun
Uint32
name_buf
[(
MAX_TAB_NAME_SIZE
+
3
)
/
4
];
strncpy
((
char
*
)
name_buf
,
name
,
sizeof
(
name_buf
));
// strncpy null-pads
name
=
(
char
*
)
name_buf
;
req
->
senderRef
=
m_reference
;
req
->
senderData
=
0
;
req
->
requestType
=
...
...
@@ -1015,7 +1020,7 @@ NdbDictInterface::getTable(const char * name, bool fullyQualifiedNames)
tSignal
.
theLength
=
GetTabInfoReq
::
SignalLength
;
LinearSectionPtr
ptr
[
1
];
ptr
[
0
].
p
=
(
Uint32
*
)
name
;
ptr
[
0
].
sz
=
strLen
;
ptr
[
0
].
sz
=
(
strLen
+
3
)
/
4
;
return
getTable
(
&
tSignal
,
ptr
,
1
,
fullyQualifiedNames
);
}
...
...
ndb/test/ndbapi/testBlobs.cpp
View file @
b5eddef1
...
...
@@ -365,7 +365,7 @@ calcBval(const Bcol& b, Bval& v, bool keepsize)
{
if
(
b
.
m_nullable
&&
urandom
(
10
)
==
0
)
{
v
.
m_len
=
0
;
delete
v
.
m_val
;
delete
[]
v
.
m_val
;
v
.
m_val
=
0
;
v
.
m_buf
=
new
char
[
1
];
}
else
{
...
...
@@ -375,7 +375,7 @@ calcBval(const Bcol& b, Bval& v, bool keepsize)
v
.
m_len
=
urandom
(
b
.
m_inline
);
else
v
.
m_len
=
urandom
(
b
.
m_inline
+
g_opt
.
m_parts
*
b
.
m_partsize
+
1
);
delete
v
.
m_val
;
delete
[]
v
.
m_val
;
v
.
m_val
=
new
char
[
v
.
m_len
+
1
];
for
(
unsigned
i
=
0
;
i
<
v
.
m_len
;
i
++
)
v
.
m_val
[
i
]
=
'a'
+
urandom
(
25
);
...
...
@@ -1449,6 +1449,7 @@ testperf()
if
(
!
testcase
(
'p'
))
return
0
;
DBG
(
"=== perf test ==="
);
g_bh1
=
g_bh2
=
0
;
g_ndb
=
new
Ndb
(
g_ncc
,
"TEST_DB"
);
CHK
(
g_ndb
->
init
()
==
0
);
CHK
(
g_ndb
->
waitUntilReady
()
==
0
);
...
...
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