Skip to content

Commit 36e03be

Browse files
committed
Bug#34854806 UtilTransactions compilation warnings [#1]
Compilation warning/error: storage/ndb/test/src/UtilTransactions.cpp:1544: error: variable 'eof' may be uninitialized when used here [-Werror,-Wconditional- uninitialized] Manual code inspection also shows there are problems with retry logic as well as potentially releasing resources. Fix by refactoring ´verifyTableReplicasWithSource` into functions where the retry, scan and compare logic are separated. This makes it possible to make sure that the "eof" variable is always initialized while fetching the next row during scan. Change-Id: I111e0a6613622aa2279a5ec5845e48e8ca0e115f
1 parent e9da938 commit 36e03be

File tree

2 files changed

+198
-175
lines changed

2 files changed

+198
-175
lines changed

storage/ndb/test/include/UtilTransactions.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,11 @@ class UtilTransactions {
295295
bool transactional = false,
296296
bool findNulls = false);
297297

298+
int verifyTableReplicasPkCompareRow(Ndb* pNdb, Uint32 nodeId,
299+
const NDBT_ResultRow& scanRow);
300+
int verifyTableReplicasScanAndCompareNodes(Ndb* pNdb, Uint32 sourceNodeId,
301+
Uint32 numDataNodes,
302+
Uint32 dataNodes[256]);
298303
int verifyTableReplicasWithSource(Ndb*, Uint32 sourceNodeId=0);
299304

300305
int verifyOrderedIndexViews(Ndb* pNdb,

0 commit comments

Comments
 (0)