File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -380,6 +380,18 @@ func (c *Canal) ClearTableCache(db []byte, table []byte) {
380
380
c .tableLock .Unlock ()
381
381
}
382
382
383
+ // SetTableCache sets table cache value for the given key
384
+ func (c * Canal ) SetTableCache (db []byte , table []byte , schema * schema.Table ) {
385
+ key := fmt .Sprintf ("%s.%s" , db , table )
386
+ c .tableLock .Lock ()
387
+ c .tables [key ] = schema
388
+ if c .cfg .DiscardNoMetaRowEvent {
389
+ // if get table info success, delete this key from errorTablesGetTime
390
+ delete (c .errorTablesGetTime , key )
391
+ }
392
+ c .tableLock .Unlock ()
393
+ }
394
+
383
395
// CheckBinlogRowImage checks MySQL binlog row image, must be in FULL, MINIMAL, NOBLOB
384
396
func (c * Canal ) CheckBinlogRowImage (image string ) error {
385
397
// need to check MySQL binlog row image? full, minimal or noblob?
You can’t perform that action at this time.
0 commit comments