Skip to content

Commit

Permalink
feat:TDSQL support link cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
taolx0 committed Oct 28, 2024
1 parent 3617b1b commit e0f3171
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions sqle/cmd/scannerd/command/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package command

import (
"fmt"

"strconv"
)

Expand Down Expand Up @@ -75,7 +74,8 @@ func GetScannerdCmd(scannerType string) (*scannerCmd, error) {
return &rootCmd, nil
case TypeMySQLMybatis:
return &myBatis, nil
case TypeMySQLSlowLog:
// TDSQL Innodb of MySQL 慢日志格式与 MySQL 慢日志格式一致,复用 Mysql 慢日志 Scanner
case TypeMySQLSlowLog, TypeTDSQLInnodbSlowLog:
return &slowLog, nil
case TypeTiDBAuditLog:
return &tidbAuditLog, nil
Expand Down
15 changes: 8 additions & 7 deletions sqle/cmd/scannerd/command/command.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package command

const (
TypeMySQLMybatis = "mysql_mybatis"
TypeMySQLSlowLog = "mysql_slow_log"
TypeSQLFile = "sql_file"
TypeTBaseSlowLog = "TBase_slow_log"
TypeTiDBAuditLog = "tidb_audit_log"
TypeRootScannerd = "root"
TypeMySQLMybatis = "mysql_mybatis"
TypeMySQLSlowLog = "mysql_slow_log"
TypeTDSQLInnodbSlowLog = "tdsql_for_innodb_slow_log"
TypeSQLFile = "sql_file"
TypeTBaseSlowLog = "TBase_slow_log"
TypeTiDBAuditLog = "tidb_audit_log"
TypeRootScannerd = "root"
)

var (
Expand Down Expand Up @@ -58,4 +59,4 @@ func init() {
sqlFile.addStringFlag(FlagInstanceName, FlagInstanceNameSort, EmptyDefaultValue, "instance name")
sqlFile.addStringFlag(FlagSchemaName, FlagSchemaNameSort, EmptyDefaultValue, "schema name")
sqlFile.addRequiredFlag(FlagDirectory)
}
}

0 comments on commit e0f3171

Please sign in to comment.