Chore: Enable ANSI_QUOTES for Mysql Database (#53277)

* remove the quote dialect

* add environment variable
This commit is contained in:
ying-jeanne authored and GitHub committed 2022-08-08 12:14:17 -04:00
1 parent 732c22ed02
commit ba89471598
3 files changed
+17 -1

No files matched your search

+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")