From 19e00e5ddc513c30e3a7d549452a9950cb5cbc45 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Sun, 11 Feb 2018 15:54:51 +0200 Subject: [PATCH] Experiment: removing LOCK IN SHARE MODE --- go/sql/builder.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/go/sql/builder.go b/go/sql/builder.go index 251a874..d61f138 100644 --- a/go/sql/builder.go +++ b/go/sql/builder.go @@ -214,18 +214,14 @@ func BuildRangeInsertQuery(databaseName, originalTableName, ghostTableName strin return "", explodedArgs, err } explodedArgs = append(explodedArgs, rangeExplodedArgs...) - transactionalClause := "" - if transactionalTable { - transactionalClause = "lock in share mode" - } result = fmt.Sprintf(` insert /* gh-ost %s.%s */ ignore into %s.%s (%s) (select %s from %s.%s force index (%s) - where (%s and %s) %s + where (%s and %s) ) `, databaseName, originalTableName, databaseName, ghostTableName, mappedSharedColumnsListing, sharedColumnsListing, databaseName, originalTableName, uniqueKey, - rangeStartComparison, rangeEndComparison, transactionalClause) + rangeStartComparison, rangeEndComparison) return result, explodedArgs, nil }