Pass BOOL values as real types (int/bool) instead of strings to SQL parameters. (#101961)
* Pass BOOL values as real types (int/bool) instead of strings to SQL parameters.
Fixes following integration tests when running with Spanner:
* TestIntegrationDataAccess
* GetDataSourcesByType/Get_prunable_data_sources
* TestIntegrationUserAuthToken:
* expires_correctly
* can_properly_rotate_tokens
* keeps_prev_token_valid_for_1_minute_after_it_is_confirmed
* Fix more places where "true" or "false" string was passed as query parameter instead of bool value.
* Removed unit test because it brought unwanted dependencies on xorm into multiple modules.
This commit is contained in:
@@ -166,8 +166,8 @@ func (ss *sqlStatsService) GetSystemStats(ctx context.Context, query *stats.GetS
|
||||
}
|
||||
// currently not supported when dashboards are in unified storage
|
||||
if !ss.features.IsEnabledGlobally(featuremgmt.FlagKubernetesClientDashboardsFolders) {
|
||||
sb.Write(`(SELECT SUM(LENGTH(data)) FROM `+dialect.Quote("dashboard")+` WHERE is_folder = ?) AS dashboard_bytes_total,`, dialect.BooleanStr(false))
|
||||
sb.Write(`(SELECT MAX(LENGTH(data)) FROM `+dialect.Quote("dashboard")+` WHERE is_folder = ?) AS dashboard_bytes_max,`, dialect.BooleanStr(false))
|
||||
sb.Write(`(SELECT SUM(LENGTH(data)) FROM `+dialect.Quote("dashboard")+` WHERE is_folder = ?) AS dashboard_bytes_total,`, dialect.BooleanValue(false))
|
||||
sb.Write(`(SELECT MAX(LENGTH(data)) FROM `+dialect.Quote("dashboard")+` WHERE is_folder = ?) AS dashboard_bytes_max,`, dialect.BooleanValue(false))
|
||||
}
|
||||
|
||||
sb.Write(ss.roleCounterSQL(ctx))
|
||||
|
||||
Reference in New Issue
Block a user