Fix tweaks

This commit is contained in:
Tim Vaillancourt 2023-01-11 23:45:27 +01:00
parent 704c4120d3
commit 7766a35651
2 changed files with 11 additions and 5 deletions

View File

@ -876,7 +876,7 @@ func (this *Applier) ExpectProcess(sessionId int64, stateHint, infoHint string)
id != connection_id()
and ? in (0, id)
and state like concat('%', ?, '%')
and info like concat('%', ?, '%')`
and info like concat('%', ?, '%')`
err := sqlutils.QueryRowsMap(this.db, query, func(m sqlutils.RowMap) error {
found = true
return nil

View File

@ -227,9 +227,13 @@ func BuildRangeInsertQuery(databaseName, originalTableName, ghostTableName strin
%s.%s
(%s)
(
select %s from %s.%s
select %s
from
%s.%s
force index (%s)
where (%s and %s) %s
where
(%s and %s)
%s
)`,
databaseName, originalTableName, databaseName, ghostTableName, mappedSharedColumnsListing,
sharedColumnsListing, databaseName, originalTableName, uniqueKey,
@ -283,7 +287,8 @@ func BuildUniqueKeyRangeEndPreparedQueryViaOffset(databaseName, tableName string
%s
from
%s.%s
where %s and %s
where
%s and %s
order by
%s
limit 1
@ -340,7 +345,8 @@ func BuildUniqueKeyRangeEndPreparedQueryViaTemptable(databaseName, tableName str
%s
from
%s.%s
where %s and %s
where
%s and %s
order by
%s
limit %d) select_osc_chunk