Chore: Enable ANSI_QUOTES for Mysql Database (#53277)

* remove the quote dialect

* add environment variable
This commit is contained in:
ying-jeanne
2022-08-08 12:14:17 -04:00
committed by GitHub
parent 732c22ed02
commit ba89471598
3 changed files with 17 additions and 1 deletions
+4
View File
@@ -281,6 +281,10 @@ func (ss *SQLStore) buildConnectionString() (string, error) {
cnnstr += fmt.Sprintf("&tx_isolation=%s", val)
}
if ss.Cfg.IsFeatureToggleEnabled("mysqlAnsiQuotes") {
cnnstr += "&sql_mode='ANSI_QUOTES'"
}
cnnstr += ss.buildExtraConnectionString('&')
case migrator.Postgres:
addr, err := util.SplitHostPortDefault(ss.dbCfg.Host, "127.0.0.1", "5432")