Skip to content

Commit

Permalink
fix same tablename bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tukeJonny committed Sep 3, 2018
1 parent c809b67 commit e605a9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mysql/innodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ func (client *MySQLClient) getIndexes(tablename string) ([]MySQLIndex, error) {
WHEN C.data_type IN ('%s') THEN 'STRING'
ELSE 'UNKNOWN' END) AS data_type
FROM information_schema.STATISTICS S INNER JOIN information_schema.COLUMNS C
ON S.column_name = C.column_name WHERE S.table_name='%s'
ON S.column_name = C.column_name WHERE S.table_name='%s' AND S.table_schema='%s'
ORDER BY S.table_schema, S.table_name, S.seq_in_index`,
strings.Join(INT_TYPES, "','"),
strings.Join(DATETIME_TYPES, "','"),
strings.Join(STRING_TYPES, "','"),
tablename)
tablename, client.DbName)
rows, err := client.Client.Query(stmt)
if err != nil {
return nil, err
Expand Down

0 comments on commit e605a9a

Please sign in to comment.