Chore: Remvoe newDBLibrary feature flag (#78074)

This commit is contained in:
Ryan McKinley
2023-11-14 06:51:35 -08:00
committed by GitHub
parent 580477bf8e
commit a221c1d754
8 changed files with 4 additions and 26 deletions

View File

@@ -308,15 +308,10 @@ func (ss *SQLStore) buildConnectionString() (string, error) {
}
// nolint:staticcheck
if ss.Cfg.IsFeatureToggleEnabled(featuremgmt.FlagMysqlAnsiQuotes) || ss.Cfg.IsFeatureToggleEnabled(featuremgmt.FlagNewDBLibrary) {
if ss.Cfg.IsFeatureToggleEnabled(featuremgmt.FlagMysqlAnsiQuotes) {
cnnstr += "&sql_mode='ANSI_QUOTES'"
}
// nolint:staticcheck
if ss.Cfg.IsFeatureToggleEnabled(featuremgmt.FlagNewDBLibrary) {
cnnstr += "&parseTime=true"
}
cnnstr += ss.buildExtraConnectionString('&')
case migrator.Postgres:
addr, err := util.SplitHostPortDefault(ss.dbCfg.Host, "127.0.0.1", "5432")

View File

@@ -104,13 +104,6 @@ var sqlStoreTestCases = []sqlStoreTest{
features: featuremgmt.WithFeatures(featuremgmt.FlagMysqlAnsiQuotes),
expConnStr: ":@tcp([::1])/test_db?collation=utf8mb4_unicode_ci&allowNativePasswords=true&clientFoundRows=true&sql_mode='ANSI_QUOTES'",
},
{
name: "New DB library",
dbType: "mysql",
dbHost: "[::1]",
features: featuremgmt.WithFeatures(featuremgmt.FlagNewDBLibrary),
expConnStr: ":@tcp([::1])/test_db?collation=utf8mb4_unicode_ci&allowNativePasswords=true&clientFoundRows=true&sql_mode='ANSI_QUOTES'&parseTime=true",
},
}
func TestIntegrationSQLConnectionString(t *testing.T) {