@@ -68,7 +68,7 @@ struct config
68
68
nWriters =10 ;
69
69
nIterations =1000 ;
70
70
nAccounts =100000 ;
71
- startId =1 ;
71
+ startId =0 ;
72
72
diapason =100000 ;
73
73
}
74
74
};
@@ -177,7 +177,10 @@ void* writer(void* arg)
177
177
csn_t snapshot =execQuery (srcTx," select dtm_extend('%s')" , gtid);
178
178
snapshot =execQuery (dstTx," select dtm_access(%ld, '%s')" , snapshot, gtid);
179
179
180
- exec (srcTx," update t set v = v - 1 where u=%d" , srcAcc);
180
+ exec (srcTx," savepoint c1" );
181
+ exec (dstTx," savepoint c2" );
182
+
183
+ exec (srcTx," update t set v = v - 1 where u=%d" , srcAcc);
181
184
exec (dstTx," update t set v = v + 1 where u=%d" , dstAcc);
182
185
183
186
exec (srcTx," prepare transaction '%s'" , gtid);
@@ -260,7 +263,7 @@ int main (int argc, char* argv[])
260
263
return 1 ;
261
264
}
262
265
263
- if (cfg.startId + cfg.diapason - 1 > cfg.nAccounts ) {
266
+ if (cfg.startId + cfg.diapason > cfg.nAccounts ) {
264
267
printf (" startId + diapason should be less that nAccounts. Exiting.\n " );
265
268
return 1 ;
266
269
}
@@ -305,7 +308,7 @@ int main (int argc, char* argv[])
305
308
printf (
306
309
" {\" update_tps\" :%f,\" read_tps\" :%f,"
307
310
" \" readers\" :%d,\" writers\" :%d,"
308
- " \" accounts\" :%d,\" iterations\" :%d,\" hosts\" :%d }\n " ,
311
+ " \" accounts\" :%d,\" iterations\" :%d,\" hosts\" :%ld }\n " ,
309
312
(double )(nWrites*USEC)/elapsed,
310
313
(double )(nReads*USEC)/elapsed,
311
314
cfg.nReaders ,