Ignore "collation mix" errors in GetCollectionRedirect()

pull/318/head
Matt Baer 5 years ago
parent 5c94d23466
commit cceea03076
  1. 2
      database.go

@ -2023,7 +2023,7 @@ func (db *datastore) RemoveCollectionRedirect(t *sql.Tx, alias string) error {
func (db *datastore) GetCollectionRedirect(alias string) (new string) {
row := db.QueryRow("SELECT new_alias FROM collectionredirects WHERE prev_alias = ?", alias)
err := row.Scan(&new)
if err != nil && err != sql.ErrNoRows {
if err != nil && err != sql.ErrNoRows && !db.isIgnorableError(err) {
log.Error("Failed selecting from collectionredirects: %v", err)
}
return

Loading…
Cancel
Save