func prepareTableData(store kv.Storage, tbl *simpleTableInfo, count int64, gen genValueFunc) error { txn, err := store.Begin() if err != nil { return errors.Trace(err) } for i := int64(1); i <= count; i++ { setRow(txn, i, tbl, gen) } return txn.Commit() }