Skip to content

Commit

Permalink
Regards #65.
Browse files Browse the repository at this point in the history
* The overall number of records uses the `DSS_HUGE` type; no longer assuming each update segment's row count can fit into an `int`
* The seed adjustment functions (`sd_order`, `sd_line` etc.) take a skip count which is a record index; but it is also a `long`, since the seeds are long. Now, we could start changing the seeds into `DSS_HUGE`s, but for now - let's just explicitly cast `DSS_HUGE` record count inputs to these function into `long`s.
  • Loading branch information
Eyal Rozenberg committed Mar 31, 2019
1 parent 3733851 commit 0604e58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,9 @@ gen_tbl (int tnum, DSS_HUGE start, DSS_HUGE count, long upd_num)
static int init = 0;
DSS_HUGE i;

int rows_per_segment=0;
int rows_this_segment=-1;
int residual_rows=0;
DSS_HUGE rows_per_segment=0;
DSS_HUGE rows_this_segment=-1;
DSS_HUGE residual_rows=0;

if (insert_segments)
{
Expand Down Expand Up @@ -1061,8 +1061,8 @@ main (int ac, char **av)
/*
* adjust RNG for any prior update generation
*/
sd_order(0, rowcnt * (step - 1));
sd_line(0, rowcnt * (step - 1));
sd_order(0, (long) (rowcnt * (step - 1)));
sd_line(0, (long) (rowcnt * (step - 1)));
upd_num = step - 1;
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/speed_seed.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ sd_line(int child, long skip_count)
}

long
sd_order(int child, long skip_count)
sd_order(int child, long skip_count)
{
UNUSED(child);
ADVANCE_STREAM(O_LCNT_SD, skip_count);
Expand Down

0 comments on commit 0604e58

Please sign in to comment.