DBZ-1417 Lock is tablewide, remove fullscan
This commit is contained in:
parent
af50ea64a4
commit
8e28e38859
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user