@@ -68,7 +68,7 @@ struct config
6868 nWriters = 10 ;
6969 nIterations = 1000 ;
7070 nAccounts = 100000 ;
71- startId = 1 ;
71+ startId = 0 ;
7272 diapason = 100000 ;
7373 }
7474};
@@ -177,7 +177,10 @@ void* writer(void* arg)
177177 csn_t snapshot = execQuery (srcTx, " select dtm_extend('%s')" , gtid);
178178 snapshot = execQuery (dstTx, " select dtm_access(%ld, '%s')" , snapshot, gtid);
179179
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);
181184 exec (dstTx, " update t set v = v + 1 where u=%d" , dstAcc);
182185
183186 exec (srcTx, " prepare transaction '%s'" , gtid);
@@ -260,7 +263,7 @@ int main (int argc, char* argv[])
260263 return 1 ;
261264 }
262265
263- if (cfg.startId + cfg.diapason - 1 > cfg.nAccounts ) {
266+ if (cfg.startId + cfg.diapason > cfg.nAccounts ) {
264267 printf (" startId + diapason should be less that nAccounts. Exiting.\n " );
265268 return 1 ;
266269 }
@@ -305,7 +308,7 @@ int main (int argc, char* argv[])
305308 printf (
306309 " {\" update_tps\" :%f, \" read_tps\" :%f,"
307310 " \" readers\" :%d, \" writers\" :%d,"
308- " \" accounts\" :%d, \" iterations\" :%d, \" hosts\" :%d }\n " ,
311+ " \" accounts\" :%d, \" iterations\" :%d, \" hosts\" :%ld }\n " ,
309312 (double )(nWrites*USEC)/elapsed,
310313 (double )(nReads*USEC)/elapsed,
311314 cfg.nReaders ,
0 commit comments