mirror of
https://github.com/dolthub/dolt.git
synced 2026-03-16 23:53:17 -05:00
Merge pull request #4229 from dolthub/andy/auto-fix
go/doltcore/sqle/globalstate: Reset AUTO_INCREMENT sequence to 1 on table drop
This commit is contained in:
@@ -160,8 +160,8 @@ func (a AutoIncrementTracker) DropTable(ctx context.Context, tableName string, w
|
||||
a.mu.Lock()
|
||||
defer a.mu.Unlock()
|
||||
|
||||
tableName = strings.ToLower(tableName)
|
||||
delete(a.sequences, tableName)
|
||||
// reset sequence to the minimum value
|
||||
a.sequences[strings.ToLower(tableName)] = 1
|
||||
|
||||
// Get the new highest value from all tables in the working sets given
|
||||
for _, ws := range wses {
|
||||
|
||||
Reference in New Issue
Block a user