Hi,

the cursor of tabele currently returns wrong results. When creating a tabele 
object the result is put into nrows and nRows() is hardcoded to return 1.

However when using the tabele cursor to fetch the results it accesses nRows() 
to get the result. This is wrong. It should access nrows directly in order to 
get the correct result.

Patch is attached.

Kind regards,

        Andreas Streichardt
--- fastbit-ibis1.1.6/src/tab.h	2010-01-13 02:36:34.000000000 +0100
+++ fastbit-ibis1.1.6_2/src/tab.h	2010-03-03 19:04:14.538378339 +0100
@@ -406,7 +406,7 @@
     virtual uint64_t getCurrentRowNumber() const {return current;}
     virtual int dump(std::ostream& out, const char* del) const {
 	if (current == 0) {
-	    out << tab.nRows() << "\n";
+	    out << tab.nrows << "\n";
 	    return 0;
 	}
 	else {
@@ -424,7 +424,7 @@
 	return -1;}
     virtual int getColumnAsLong(const char* cn, int64_t& val) const {
 	if (current == 0 && stricmp(tab.colName(), cn) == 0) {
-	    val = tab.nRows();
+	    val = tab.nrows;
 	    return 1;}
 	else {
 	    return -1;
@@ -432,7 +432,7 @@
     }
     virtual int getColumnAsULong(const char* cn, uint64_t& val) const {
 	if (current == 0 && stricmp(tab.colName(), cn) == 0) {
-	    val = tab.nRows();
+	    val = tab.nrows;
 	    return 1;}
 	else {
 	    return -1;
@@ -451,14 +451,14 @@
 	return -1;}
     virtual int getColumnAsLong(uint32_t cn, int64_t& val) const {
 	if (current == 0 && cn == 0) {
-	    val = tab.nRows();
+	    val = tab.nrows;
 	    return 1;}
 	else {
 	    return -1;
 	}}
     virtual int getColumnAsULong(uint32_t cn, uint64_t& val) const {
 	if (current == 0 && cn == 0) {
-	    val = tab.nRows();
+	    val = tab.nrows;
 	    return 1;}
 	else {
 	    return -1;
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to