@@ -112,7 +112,7 @@ func (cp *RemoteCheckPoint) prepare() error {
112
112
113
113
func (cp * RemoteCheckPoint ) createSchema () error {
114
114
sql2 := fmt .Sprintf ("CREATE SCHEMA IF NOT EXISTS `%s`" , cp .schema )
115
- err := cp .conn .executeSQL (cp .tctx , []string {sql2 }, true )
115
+ err := cp .conn .executeSQL (cp .tctx , []string {sql2 })
116
116
return terror .WithScope (err , terror .ScopeDownstream )
117
117
}
118
118
@@ -131,7 +131,7 @@ func (cp *RemoteCheckPoint) createTable() error {
131
131
);
132
132
`
133
133
sql2 := fmt .Sprintf (createTable , tableName )
134
- err := cp .conn .executeSQL (cp .tctx , []string {sql2 }, true )
134
+ err := cp .conn .executeSQL (cp .tctx , []string {sql2 })
135
135
return terror .WithScope (err , terror .ScopeDownstream )
136
136
}
137
137
@@ -143,7 +143,7 @@ func (cp *RemoteCheckPoint) Load() error {
143
143
}()
144
144
145
145
query := fmt .Sprintf ("SELECT `filename`,`cp_schema`,`cp_table`,`offset`,`end_pos` from `%s`.`%s` where `id`=?" , cp .schema , cp .table )
146
- rows , err := cp .conn .querySQL (cp .tctx , query , queryRetryCount , cp .id )
146
+ rows , err := cp .conn .querySQL (cp .tctx , query , cp .id )
147
147
if err != nil {
148
148
return terror .WithScope (err , terror .ScopeDownstream )
149
149
}
@@ -279,7 +279,8 @@ func (cp *RemoteCheckPoint) Init(filename string, endPos int64) error {
279
279
zap .String ("table" , fields [1 ]),
280
280
zap .Int64 ("offset" , 0 ),
281
281
zap .Int64 ("end position" , endPos ))
282
- err := cp .conn .executeCheckpointSQL (cp .tctx , sql2 , maxRetryCount , cp .id , filename , fields [0 ], fields [1 ], 0 , endPos )
282
+ args := []interface {}{cp .id , filename , fields [0 ], fields [1 ], 0 , endPos }
283
+ err := cp .conn .executeSQL (cp .tctx , []string {sql2 }, args )
283
284
if err != nil {
284
285
if isErrDupEntry (err ) {
285
286
cp .tctx .L ().Info ("checkpoint record already exists, skip it." , zap .String ("id" , cp .id ), zap .String ("filename" , filename ))
@@ -305,14 +306,14 @@ func (cp *RemoteCheckPoint) GenSQL(filename string, offset int64) string {
305
306
// Clear implements CheckPoint.Clear
306
307
func (cp * RemoteCheckPoint ) Clear () error {
307
308
sql2 := fmt .Sprintf ("DELETE FROM `%s`.`%s` WHERE `id` = '%s'" , cp .schema , cp .table , cp .id )
308
- err := cp .conn .executeSQL (cp .tctx , []string {sql2 }, true )
309
+ err := cp .conn .executeSQL (cp .tctx , []string {sql2 })
309
310
return terror .WithScope (err , terror .ScopeDownstream )
310
311
}
311
312
312
313
// Count implements CheckPoint.Count
313
314
func (cp * RemoteCheckPoint ) Count () (int , error ) {
314
315
query := fmt .Sprintf ("SELECT COUNT(id) FROM `%s`.`%s` WHERE `id` = ?" , cp .schema , cp .table )
315
- rows , err := cp .conn .querySQL (cp .tctx , query , queryRetryCount , cp .id )
316
+ rows , err := cp .conn .querySQL (cp .tctx , query , cp .id )
316
317
if err != nil {
317
318
return 0 , terror .WithScope (err , terror .ScopeDownstream )
318
319
}
0 commit comments