Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

表名为关键字时审核任务无法正常展示且日志有报错 #499

Closed
sjjian opened this issue May 6, 2022 · 3 comments
Closed
Assignees
Labels
bug Something isn't working verified the issue all pr is verified
Milestone

Comments

@sjjian
Copy link
Member

sjjian commented May 6, 2022

SQLe Version
sqle main

Describe the bug
创建审核任务时,如果表名中存在以关键字(比如group)明明的表,审核任务可以正常创建,页面可以正常打开,但是SQL语句池是空的,查看日志时发现是SQL执行异常.

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 your MySQL server version for the right syntax to use near 'group' at line 1\n" name=meta_iastdb thread_id=J90 type=audit_plan

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Suggestion
Add any other context about the problem here.

@Marcus9530
Copy link
Collaborator

UI Version: release-1.2204.x c04917c
Server Version: release-1.2204.x 5248287
复现成功:
复现步骤:
1.创建一个关键字为表名的sql表
2.然后创建审核任务,类型选择为库表元数据
3.审核任务创建成功之后,查看sql池为空,然后mysql本神,确实存在sql表
image
image

image

@sjjian
Copy link
Member Author

sjjian commented May 9, 2022

Caused the problem: #502

@Marcus9530
Copy link
Collaborator

Marcus9530 commented May 27, 2022

UI Version: main 5bfc004
Server Version: main-ee 9ce7104

验证通过
验证步骤:
1.创建一个关键字为表名的sql表
2.然后创建审核任务,类型选择为库表元数据
3.审核任务创建成功之后,可以看到所有的表结构,其实关键字开头的表也可以看到
image

image

@Marcus9530 Marcus9530 added the verified the issue all pr is verified label May 27, 2022
LordofAvernus pushed a commit that referenced this issue Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verified the issue all pr is verified
Projects
None yet
Development

No branches or pull requests

3 participants