Skip to content

Commit 6d30354

Browse files
author
James Cor
committed
Merge branch 'main' into james/views2
2 parents 6923d2d + 3281d09 commit 6d30354

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sql/planbuilder/select.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,11 @@ func (b *Builder) currentDb() sql.Database {
211211
if err != nil {
212212
b.handleErr(err)
213213
}
214-
215-
if privilegedDatabase, ok := database.(mysql_db.PrivilegedDatabase); ok {
216-
database = privilegedDatabase.Unwrap()
217-
}
218214
b.currentDatabase = database
219215
}
216+
if privilegedDatabase, ok := b.currentDatabase.(mysql_db.PrivilegedDatabase); ok {
217+
b.currentDatabase = privilegedDatabase.Unwrap()
218+
}
220219
return b.currentDatabase
221220
}
222221

0 commit comments

Comments
 (0)