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

Commit b983fd2

Browse files
committed
loader: fixup the drop statement with duplicate database prefix
1 parent 538d5b1 commit b983fd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/loader.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ func restoreTableSchema(log *xlog.Log, overwrite bool, tables []string, conn *Co
9999
for _, query := range querys {
100100
if !strings.HasPrefix(query, "/*") && query != "" {
101101
if overwrite {
102-
log.Info("drop(overwrite.is.true).table[%s.%s]", db, name)
103-
dropQuery := fmt.Sprintf("DROP TABLE IF EXISTS `%s`.`%s`", db, name)
102+
log.Info("drop(overwrite.is.true).table[%s]", name)
103+
dropQuery := fmt.Sprintf("DROP TABLE IF EXISTS %s", name)
104104
err = conn.Execute(dropQuery)
105105
AssertNil(err)
106106
}

0 commit comments

Comments
 (0)