为提高效率,请提供以下信息,问题描述清晰能够更快得到解决:
【TiDB 版本】
v4.0.10
【问题描述】
tidb慢查询界面sql导出失败,提示error.api.other: Error 1054: Unknown column 'optimize_time' in 'field list'
,如下图
错误接口为
/dashboard/api/slow_query/download/token
实际只选和sql这一列,前端传参为"*"
返回结果:
{
"error": true,
"message": "error.api.other: Error 1054: Unknown column 'optimize_time' in 'field list'",
"code": "error.api.other",
"full_text": "error.api.other: Error 1054: Unknown column 'optimize_time' in 'field list'\
at github.com/pingcap-incubator/tidb-dashboard/pkg/apiserver/utils.NewAPIError()\
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.10/go/pkg/mod/github.com/pingcap-incubator/tidb-dashboard@v0.0.0-20201126111827-6c8be2240067/pkg/apiserver/utils/error.go:67\
at github.com/pingcap-incubator/tidb-dashboard/pkg/apiserver/utils.MWHandleErrors.func1()\
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.10/go/pkg/mod/github.com/pingcap-incubator/tidb-dashboard@v0.0.0-20201126111827-6c8be2240067/pkg/apiserver/utils/error.go:96\
at github.com/gin-gonic/gin.(*Context).Next()\
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.10/go/pkg/mod/github.com/gin-gonic/gin@v1.5.0/context.go:147\
at github.com/gin-contrib/gzip.Gzip.func2()\
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.10/go/pkg/mod/github.com/gin-contrib/gzip@v0.0.1/gzip.go:47\
at github.com/gin-gonic/gin.(*Context).Next()\
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.10/go/pkg/mod/github.com/gin-gonic/gin@v1.5.0/context.go:147\
at github.com/gin-gonic/gin.RecoveryWithWriter.func1()\
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.10/go/pkg/mod/github.com/gin-gonic/gin@v1.5.0/recovery.go:83\
at github.com/gin-gonic/gin.(*Context).Next()\
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.10/go/pkg/mod/github.com/gin-gonic/gin@v1.5.0/context.go:147\
at github.com/gin-gonic/gin.(*Engine).handleHTTPRequest()\
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.10/go/pkg/mod/github.com/gin-gonic/gin@v1.5.0/gin.go:403\
at github.com/gin-gonic/gin.(*Engine).ServeHTTP()\
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.10/go/pkg/mod/github.com/gin-gonic/gin@v1.5.0/gin.go:364\
at github.com/pingcap-incubator/tidb-dashboard/pkg/apiserver.(*Service).handler()\
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.10/go/pkg/mod/github.com/pingcap-incubator/tidb-dashboard@v0.0.0-20201126111827-6c8be2240067/pkg/apiserver/apiserver.go:188\
at net/http.HandlerFunc.ServeHTTP()\
\t/usr/local/go/src/net/http/server.go:2007\
at github.com/pingcap-incubator/tidb-dashboard/pkg/utils.(*ServiceStatus).NewStatusAwareHandler.func1()\
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.10/go/pkg/mod/github.com/pingcap-incubator/tidb-dashboard@v0.0.0-20201126111827-6c8be2240067/pkg/utils/service_status.go:79\
at net/http.HandlerFunc.ServeHTTP()\
\t/usr/local/go/src/net/http/server.go:2007\
at net/http.(*ServeMux).ServeHTTP()\
\t/usr/local/go/src/net/http/server.go:2387\
at go.etcd.io/etcd/embed.(*accessController).ServeHTTP()\
\t/home/jenkins/agent/workspace/build_pd_multi_branch_v4.0.10/go/pkg/mod/go.etcd.io/etcd@v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738/embed/serve.go:359\
at net/http.serverHandler.ServeHTTP()\
\t/usr/local/go/src/net/http/server.go:2802\
at net/http.(*conn).serve()\
\t/usr/local/go/src/net/http/server.go:1890\
at runtime.goexit()\
\t/usr/local/go/src/runtime/asm_amd64.s:1357"
}
若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。