Skip to content

Commit

Permalink
- large SFs leas to o_totalprice overflowing => workaround is to set …
Browse files Browse the repository at this point in the history
…it to 0

- (ps_partkey,psz-suppkey) was not unique to to an error in class_b generation
  • Loading branch information
peterboncz committed Jun 17, 2017
1 parent 7a9412a commit 94b96cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ unsigned long partsupp_class_b(unsigned long partkey_hash) {
}
unsigned long partsupp_class_c(unsigned long partkey_hash) {
unsigned long supp_r = partkey_hash % 5;
unsigned long supp_r2 = (supp_r + ((partkey_hash/20) % 4)) % 5;
unsigned long supp_r2 = (supp_r + 1 + ((partkey_hash/20) % 4)) % 5;
unsigned long supp_z = (partkey_hash/80) % (tdefs[SUPP].base*scale/5);
unsigned long supp_h = supp_r2 * (tdefs[SUPP].base*scale/5) + supp_z;
return hash(supp_h, tdefs[SUPP].base * scale, max_bit_tbl_supplier, 1);
Expand Down Expand Up @@ -386,6 +386,7 @@ mk_order(DSS_HUGE index, order_t * o, long upd_num)
}
if (lcnt >= MAX_L_PER_O) break;
}
o->totalprice = 0; /* there would be overflow, anyway.. */
o->lines = MAX_L_PER_O;
} else if (JCCH_skew && upd_num == 0) {
o->lines = (index <= 3*20)?4:3;
Expand Down
2 changes: 1 addition & 1 deletion dsstypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ typedef struct
DSS_HUGE retailprice;
char comment[P_CMNT_MAX + 1];
int clen;
#if JCCH_SKEW
partsupp_t *s;
#if JCCH_SKEW
DSS_HUGE suppcnt;
#endif
} part_t;
Expand Down

0 comments on commit 94b96cd

Please sign in to comment.