You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
row, err:=c.dbs[0].Query(fmt.Sprintf("select count(*) from (select distinct index_name from information_schema.statistics where table_name='%s' and index_name != 'PRIMARY') as tmp;;", table.name))
returnerrors.Errorf("table %s index cnt are not same, expected cnt: %d, got cnt: %d \n %s", table.name, len(table.indexes), indexCnt, table.debugPrintToString())
424
424
}
425
425
row.Close()
426
-
for_, idx:=rangetable.indexes {
427
-
row, err=c.dbs[0].Query(fmt.Sprintf("select GROUP_CONCAT(column_name ORDER BY seq_in_index) from information_schema.statistics where table_name='%s' and index_name='%s';", table.name, idx.name))
428
-
iferr!=nil {
429
-
returnerr
430
-
}
431
-
row.Next()
432
-
err=row.Scan(&columnNames)
433
-
row.Close()
434
-
iferr!=nil {
435
-
returnerr
436
-
}
437
-
ifidx.signature!=columnNames {
438
-
returnerrors.Errorf("table index columns doesn't match, index name: %s, expected: %s, got: %s", idx.name, idx.signature, columnNames)
439
-
}
440
-
}
426
+
//for _, idx := range table.indexes {
427
+
// row, err = c.dbs[0].Query(fmt.Sprintf("select GROUP_CONCAT(column_name ORDER BY seq_in_index) from information_schema.statistics where table_name='%s' and index_name='%s';", table.name, idx.name))
428
+
// if err != nil {
429
+
// return err
430
+
// }
431
+
// row.Next()
432
+
// err = row.Scan(&columnNames)
433
+
// row.Close()
434
+
// if err != nil {
435
+
// return err
436
+
// }
437
+
// if idx.signature != columnNames {
438
+
// return errors.Errorf("table index columns doesn't match, index name: %s, expected: %s, got: %s", idx.name, idx.signature, columnNames)
0 commit comments