[MM-26837] attempt at fixing flaky test on mysql-5.6 (#15110)
Summary - Attempt at fixing the AutocompleteInTeam/empty_string test which is flaky on MySQL-5.6. This is likely an index_merge_intersection optimization issue. See https://community.mattermost.com/core/pl/uzgygwa9e3d4pns14ayfs7mobw for more discussion. The fix here simply modifies the where clause to change the query plan so index_merge_intersection is not used, while also not introducing a temporary table or a filesort. Ticket Link - https://mattermost.atlassian.net/browse/MM-26837
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ac26555cdb
Коммит
e8d431ee7c
@@ -2584,7 +2584,7 @@ func (s SqlChannelStore) GetMembersForUserWithPagination(teamId, userId string,
|
||||
}
|
||||
|
||||
func (s SqlChannelStore) AutocompleteInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
|
||||
deleteFilter := "AND c.DeleteAt = 0"
|
||||
deleteFilter := "AND Channels.DeleteAt = 0"
|
||||
if includeDeleted {
|
||||
deleteFilter = ""
|
||||
}
|
||||
@@ -2597,7 +2597,7 @@ func (s SqlChannelStore) AutocompleteInTeam(teamId string, term string, includeD
|
||||
JOIN
|
||||
PublicChannels c ON (c.Id = Channels.Id)
|
||||
WHERE
|
||||
c.TeamId = :TeamId
|
||||
Channels.TeamId = :TeamId
|
||||
` + deleteFilter + `
|
||||
%v
|
||||
LIMIT ` + strconv.Itoa(model.CHANNEL_SEARCH_DEFAULT_LIMIT)
|
||||
|
||||
Ссылка в новой задаче
Block a user