File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ static void gen_snapshot(Snapshot *s) {
195195 Transaction * t ;
196196 int n = 0 ;
197197 s -> times_sent = 0 ;
198+ #if 0
198199 for (t = (Transaction * )active_transactions .prev ; t != (Transaction * )& active_transactions ; t = (Transaction * )t -> elem .prev ) {
199200 /*
200201 if (t->xid < s->xmin) {
@@ -206,6 +207,13 @@ static void gen_snapshot(Snapshot *s) {
206207 */
207208 s -> active [n ++ ] = t -> xid ;
208209 }
210+ #else
211+ if (!l2_list_is_empty (& active_transactions )) {
212+ s -> active [0 ] = ((Transaction * )active_transactions .prev )-> xid ;
213+ s -> active [1 ] = ((Transaction * )active_transactions .next )-> xid ;
214+ n = 2 ;
215+ }
216+ #endif
209217 s -> nactive = n ;
210218 if (n > 0 ) {
211219 s -> xmin = s -> active [0 ];
Original file line number Diff line number Diff line change @@ -231,6 +231,7 @@ int main (int argc, char* argv[])
231231 if (initialize) {
232232 initializeDatabase ();
233233 printf (" %d accounts inserted\n " , cfg.nAccounts );
234+ return 0 ;
234235 }
235236
236237 time_t start = getCurrentTime ();
You can’t perform that action at this time.
0 commit comments