Skip to content

Commit b3babf3

Browse files
committed
Bug#34854806 UtilTransactions compilation warnings [mysql#4]
Potential read of uninitialized dataNodes[0] when no alive nodes are available. Fix by checking for zero data nodes and fail test. trunk/storage/ndb/test/src/UtilTransactions.cpp:1710:9: warning: 3rd function call argument is an uninitialized value [clang-analyzer- core.CallAndMessage] Change-Id: I7c1e362eb0d62bdb560967144ca39966aed8a3c1
1 parent 5ef816f commit b3babf3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

storage/ndb/test/src/UtilTransactions.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,6 +1718,12 @@ UtilTransactions::verifyOrderedIndexViews(Ndb* pNdb,
17181718
//ndbout_c("Found %u data nodes", numDataNodes);
17191719
}
17201720

1721+
if (numDataNodes == 0)
1722+
{
1723+
/* No alive nodes */
1724+
return NDBT_FAILED;
1725+
}
1726+
17211727
if (numDataNodes == 1)
17221728
{
17231729
/* No replicas */

0 commit comments

Comments
 (0)