}
// if still within the result set
- if (mdb->row_number < mdb->num_rows) {
+ if (mdb->row_number >= 0 && mdb->row_number < mdb->num_rows) {
Dmsg2(500, "my_postgresql_fetch_row row number '%d' is acceptable (0..%d)\n", mdb->row_number, mdb->num_rows);
// get each value from this row
for (j = 0; j < mdb->num_fields; j++) {
mdb->num_rows = PQntuples(mdb->result);
Dmsg1(500, "we have %d rows\n", mdb->num_rows);
- mdb->status = 0; /* succeed */
+ mdb->row_number = 0; /* we can start to fetch something */
+ mdb->status = 0; /* succeed */
} else {
Dmsg1(50, "Result status failed: %s\n", query);
goto bail_out;
General:
14Jul09
+ebl Fix postgresql driver bug that displayed <NULL> rows from time to time.
kes More cleanup of bootstrap
ebl Implement the project 'restore' menu: enter a JobId, automatically
select dependents