DBZ-1417 Lock is tablewide, remove fullscan

This commit is contained in:
Jiri Pechanec 2019-08-05 10:51:52 +02:00 committed by Gunnar Morling
parent af50ea64a4
commit 8e28e38859

View File

@ -120,7 +120,7 @@ else if (connectorConfig.getSnapshotIsolationMode() == SnapshotIsolationMode.EXC
LOGGER.info("Locking table {}", tableId);
String query = String.format("SELECT * FROM [%s].[%s] WITH (TABLOCKX)", tableId.schema(), tableId.table());
String query = String.format("SELECT TOP(0) * FROM [%s].[%s] WITH (TABLOCKX)", tableId.schema(), tableId.table());
statement.executeQuery(query).close();
}
}