mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
SQLStore: Fix parseTime check (#94175)
This commit is contained in:
committed by
GitHub
parent
ee8bb63d2d
commit
4623a6471b
@@ -289,7 +289,7 @@ func (ss *SQLStore) initEngine(engine *xorm.Engine) error {
|
||||
}
|
||||
if engine == nil {
|
||||
// Ensure that parseTime is enabled for MySQL
|
||||
if ss.features.IsEnabledGlobally(featuremgmt.FlagMysqlParseTime) && ss.dbCfg.Type == migrator.MySQL && !strings.Contains(ss.dbCfg.ConnectionString, "parseTime=") {
|
||||
if ss.features.IsEnabledGlobally(featuremgmt.FlagMysqlParseTime) && strings.Contains(ss.dbCfg.Type, migrator.MySQL) && !strings.Contains(ss.dbCfg.ConnectionString, "parseTime=") {
|
||||
if strings.Contains(ss.dbCfg.ConnectionString, "?") {
|
||||
ss.dbCfg.ConnectionString += "&parseTime=true"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user