Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Commit

Permalink
loader: fixup the drop statement with duplicate database prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
BohuTANG committed Mar 28, 2018
1 parent 538d5b1 commit b983fd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ func restoreTableSchema(log *xlog.Log, overwrite bool, tables []string, conn *Co
for _, query := range querys {
if !strings.HasPrefix(query, "/*") && query != "" {
if overwrite {
log.Info("drop(overwrite.is.true).table[%s.%s]", db, name)
dropQuery := fmt.Sprintf("DROP TABLE IF EXISTS `%s`.`%s`", db, name)
log.Info("drop(overwrite.is.true).table[%s]", name)
dropQuery := fmt.Sprintf("DROP TABLE IF EXISTS %s", name)
err = conn.Execute(dropQuery)
AssertNil(err)
}
Expand Down

0 comments on commit b983fd2

Please sign in to comment.