From ce3aa09e36ecc24f65dadb85137be4dcfa5c8be2 Mon Sep 17 00:00:00 2001 From: kishoramballi Date: Fri, 9 Oct 2009 04:38:57 +0000 Subject: [PATCH] Count is binded with long long type parameter internally. For count int was binded hence was the corruption. --- src/tools/cacheverify.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tools/cacheverify.cxx b/src/tools/cacheverify.cxx index 6634421a..222f694d 100644 --- a/src/tools/cacheverify.cxx +++ b/src/tools/cacheverify.cxx @@ -104,8 +104,7 @@ DbRetVal verifyCount(const char *tblName, long numTuples) if (rv != OK) { delete adConn; return ErrSysInit; } AbsSqlStatement *adStmt = SqlFactory::createStatement(CSqlAdapter); adStmt->setConnection(adConn); - float count = 0; - int count1=0; + long long count1=0; int rows = 0; sprintf(statement, "select count(*) from %s;", tblName); rv = adConn->beginTrans(); @@ -134,7 +133,7 @@ DbRetVal verifyCount(const char *tblName, long numTuples) printf("-------------------+-------------------+-------------------+\n"); printf(" Data | In CSQL | In TargetDB |\n"); printf("-------------------+-------------------+-------------------+\n"); - printf(" No. Of Records | %-6ld | %-6d |\n", numTuples, count1); + printf(" No. Of Records | %-6ld | %-6ld |\n", numTuples, count1); printf("-------------------+-------------------+-------------------+\n"); delete adStmt; delete adConn; return OK; -- 2.11.4.GIT