@@ -435,6 +435,8 @@ func (this *Applier) CreateCheckpointTable() error {
435435 "`gh_ost_chk_timestamp` bigint" ,
436436 "`gh_ost_chk_coords` varchar(4096)" ,
437437 "`gh_ost_chk_iteration` bigint" ,
438+ "`gh_ost_rows_copied` bigint" ,
439+ "`gh_ost_dml_applied` bigint" ,
438440 }
439441 for _ , col := range this .migrationContext .UniqueKey .Columns .Columns () {
440442 if col .MySQLType == "" {
@@ -623,7 +625,7 @@ func (this *Applier) WriteCheckpoint(chk *Checkpoint) (int64, error) {
623625 if err != nil {
624626 return insertId , err
625627 }
626- args := sqlutils .Args (chk .LastTrxCoords .String (), chk .Iteration )
628+ args := sqlutils .Args (chk .LastTrxCoords .String (), chk .Iteration , chk . RowsCopied , chk . DMLApplied )
627629 args = append (args , uniqueKeyArgs ... )
628630 res , err := this .db .Exec (query , args ... )
629631 if err != nil {
@@ -641,7 +643,7 @@ func (this *Applier) ReadLastCheckpoint() (*Checkpoint, error) {
641643
642644 var coordStr string
643645 var timestamp int64
644- ptrs := []interface {}{& chk .Id , & timestamp , & coordStr , & chk .Iteration }
646+ ptrs := []interface {}{& chk .Id , & timestamp , & coordStr , & chk .Iteration , & chk . RowsCopied , & chk . DMLApplied }
645647 ptrs = append (ptrs , chk .IterationRangeMin .ValuesPointers ... )
646648 ptrs = append (ptrs , chk .IterationRangeMax .ValuesPointers ... )
647649 err := row .Scan (ptrs ... )
0 commit comments