Skip to content

Commit 51db39f

Browse files
committed
lock/unlock tables for schema snapshot
1 parent 2a3aa7c commit 51db39f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

driver/oracle/config/db_config.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,12 @@ SELECT dbms_metadata.get_ddl('TABLE','%s','%s') FROM dual`, table, schema))
201201
}
202202
return query, nil
203203
}
204+
205+
func (o *OracleDB) LockTablesForSchema() {
206+
// tx lock table
207+
"LOCK TABLE " + quote(tableId) + " IN ROW SHARE MODE"
208+
}
209+
210+
func releaseSchemaSnapshotLock() {
211+
// roll back connect
212+
}

driver/oracle/extractor/extractor_oracle.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,7 @@ func (e *ExtractorOracle) CheckAndApplyLowerCaseTableNames() {
864864
}
865865

866866
func (e *ExtractorOracle) oracleDump() error {
867+
867868
// step 1 : todo lock row
868869
// query : lock table schema.table in row share mode;
869870
if err := e.getSchemaTablesAndMeta(); err != nil {

0 commit comments

Comments
 (0)