mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-12 10:32:27 -06:00
fix rebase problems
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user