Skip to content

Commit

Permalink
MariaDB: Make version check compatible with 10.10 #2913
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Mayer <michael@photoprism.app>
  • Loading branch information
lastzero committed Nov 18, 2022
1 parent 10b08aa commit 441812f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ services:

## MariaDB Database Server
## Docs: https://mariadb.com/docs/reference/
## Release Notes: https://mariadb.com/kb/en/changes-improvements-in-mariadb-109/
## Release Notes: https://mariadb.com/kb/en/changes-improvements-in-mariadb-1010/
mariadb:
image: mariadb:10.9
image: mariadb:10.10
security_opt: # see https://github.com/MariaDB/mariadb-docker/issues/434#issuecomment-1136151239
- seccomp:unconfined
- apparmor:unconfined
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (c *Config) checkDb(db *gorm.DB) error {
}
var res Res
if err := db.Raw("SHOW VARIABLES LIKE 'innodb_version'").Scan(&res).Error; err != nil {
return err
return nil
} else if v := strings.Split(res.Value, "."); len(v) < 3 {
log.Warnf("config: unknown database server version")
} else if major := txt.UInt(v[0]); major < 10 {
Expand Down

0 comments on commit 441812f

Please sign in to comment.