From 7493474a246e12c586b529a6d6441940f6a1acfa Mon Sep 17 00:00:00 2001 From: alextinng Date: Thu, 5 May 2022 10:35:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A1=A8=E5=90=8D=E4=B8=BA?= =?UTF-8?q?=E5=85=B3=E9=94=AE=E5=AD=97=E6=97=B6=E5=AE=A1=E6=A0=B8=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit time="2022-05-05T10:24:52+08:00" level=error msg="query sql failed; host: 10.0.11 .123, port: 3306, user: root, query: show create table group, error: Error 1064:: You have an error in your SQL syntax; check the manual that corresponds to yourr MySQL server version for the right syntax to use near 'group' at line 1\n" namee =meta_iastdb thread_id=J90 type=audit_plan --- sqle/driver/mysql/executor/executor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqle/driver/mysql/executor/executor.go b/sqle/driver/mysql/executor/executor.go index c963915e60..68f7c5ef3d 100644 --- a/sqle/driver/mysql/executor/executor.go +++ b/sqle/driver/mysql/executor/executor.go @@ -211,7 +211,7 @@ func Ping(entry *logrus.Entry, instance *mdriver.DSN) error { } func (c *Executor) ShowCreateTable(tableName string) (string, error) { - result, err := c.Db.Query(fmt.Sprintf("show create table %s", tableName)) + result, err := c.Db.Query(fmt.Sprintf("show create table `%s`", tableName)) if err != nil { return "", err }