fix rebase problems

This commit is contained in:
Andy Arthur
2021-07-14 11:25:58 -07:00
parent dc81473219
commit c54ce0be5a
2 changed files with 9 additions and 7 deletions

View File

@@ -565,20 +565,22 @@ func (sess *Session) GetDoltDB(ctx *sql.Context, dbName string) (*doltdb.DoltDB,
return dbState.dbData.Ddb, true
}
func (sess *Session) GetDoltDbAutoIncrementTracker(dbName string) (globalstate.AutoIncrementTracker, bool) {
d, ok := sess.DbStates[dbName]
func (sess *Session) GetDoltDbAutoIncrementTracker(ctx *sql.Context, dbName string) (globalstate.AutoIncrementTracker, bool) {
dbState, ok, err := sess.LookupDbState(ctx, dbName)
if err != nil {
return nil, false
}
if !ok {
return nil, false
}
wsref := d.WorkingSet.Ref()
wsref := dbState.WorkingSet.Ref()
if d.GlobalState == nil {
if dbState.GlobalState == nil {
return nil, false
}
tracker := d.GlobalState.GetAutoIncrementTracker(wsref)
tracker := dbState.GlobalState.GetAutoIncrementTracker(wsref)
return tracker, true
}

View File

@@ -68,7 +68,7 @@ func newSqlTableEditor(ctx *sql.Context, t *WritableDoltTable) (*sqlTableEditor,
}
doltSession := dsess.DSessFromSess(ctx.Session)
ait, _ := doltSession.GetDoltDbAutoIncrementTracker(t.db.Name())
ait, _ := doltSession.GetDoltDbAutoIncrementTracker(ctx, t.db.Name())
conv := NewKVToSqlRowConverterForCols(t.nbf, t.sch.GetAllCols().GetColumns())
return &sqlTableEditor{