1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

ndb - valgrind fixes

ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  valgrind fixes
ndb/test/ndbapi/testBlobs.cpp:
  valgrind fixes
This commit is contained in:
unknown
2005-06-13 16:19:20 +02:00
parent 8c4fe301d0
commit a2c00c6b42
2 changed files with 9 additions and 3 deletions

View File

@ -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);