Experiment: removing LOCK IN SHARE MODE
This commit is contained in:
parent
4390c854ca
commit
19e00e5ddc
@ -214,18 +214,14 @@ func BuildRangeInsertQuery(databaseName, originalTableName, ghostTableName strin
|
|||||||
return "", explodedArgs, err
|
return "", explodedArgs, err
|
||||||
}
|
}
|
||||||
explodedArgs = append(explodedArgs, rangeExplodedArgs...)
|
explodedArgs = append(explodedArgs, rangeExplodedArgs...)
|
||||||
transactionalClause := ""
|
|
||||||
if transactionalTable {
|
|
||||||
transactionalClause = "lock in share mode"
|
|
||||||
}
|
|
||||||
result = fmt.Sprintf(`
|
result = fmt.Sprintf(`
|
||||||
insert /* gh-ost %s.%s */ ignore into %s.%s (%s)
|
insert /* gh-ost %s.%s */ ignore into %s.%s (%s)
|
||||||
(select %s from %s.%s force index (%s)
|
(select %s from %s.%s force index (%s)
|
||||||
where (%s and %s) %s
|
where (%s and %s)
|
||||||
)
|
)
|
||||||
`, databaseName, originalTableName, databaseName, ghostTableName, mappedSharedColumnsListing,
|
`, databaseName, originalTableName, databaseName, ghostTableName, mappedSharedColumnsListing,
|
||||||
sharedColumnsListing, databaseName, originalTableName, uniqueKey,
|
sharedColumnsListing, databaseName, originalTableName, uniqueKey,
|
||||||
rangeStartComparison, rangeEndComparison, transactionalClause)
|
rangeStartComparison, rangeEndComparison)
|
||||||
return result, explodedArgs, nil
|
return result, explodedArgs, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user