File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -908,24 +908,18 @@ func (c *testCase) executeAdminCheck() error {
908
908
909
909
// build SQL
910
910
sql := "ADMIN CHECK TABLE "
911
- i := 0
912
- for _ , table := range c .tables {
913
- if i > 0 {
914
- sql += ", "
915
- }
916
- sql += fmt .Sprintf ("`%s`" , table .name )
917
- i ++
918
- }
919
911
dbIdx := rand .Intn (len (c .dbs ))
920
912
db := c .dbs [dbIdx ]
921
- // execute
922
- log .Infof ("[ddl] [instance %d] %s" , c .caseIndex , sql )
923
- _ , err := db .Exec (sql )
924
- if err != nil {
925
- if dmlIgnoreError (err ) {
926
- return nil
913
+ for _ , table := range c .tables {
914
+ _ , err := db .Exec (fmt .Sprintf ("ADMIN CHECK TABLE `%s`" , table .name ))
915
+ if err != nil {
916
+ if dmlIgnoreError (err ) {
917
+ return nil
918
+ }
919
+ return errors .Annotatef (err , "Error when executing SQL: %s" , sql )
927
920
}
928
- return errors .Annotatef (err , "Error when executing SQL: %s" , sql )
929
921
}
922
+ // execute
923
+ log .Infof ("[ddl] [instance %d]" , c .caseIndex )
930
924
return nil
931
925
}
You can’t perform that action at this time.
0 commit comments