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

drop view will make the task unable to be approved normally #219

Open
HuangWeiCen opened this issue Jan 19, 2022 · 0 comments
Open

drop view will make the task unable to be approved normally #219

HuangWeiCen opened this issue Jan 19, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@HuangWeiCen
Copy link
Contributor

问题简介:
如果被审核的任务中存在对view进行删除操作的sql(对视图进行drop view 和drop table都不行), 会导致审核报错, 无法正常执行审核

复现状态:
稳定复现

绕过手段:
因为目前sqle不支持视图相关sql, 所以可以通过移除相关sql的方式使审核可以正常执行

问题原因:
sql解析器将drop view 解析成了 drop table(drop table还是drop table), sqle 在基本检查(show tables 可以查出视图)通过后会给drop table生成回滚语句, 生成回滚语句时需要查询表结构(show create table), 视图的返回结果中没有'create table'这一列(取而代之的是'create view'列), 导致查询表结构报错, 从而导致审核无法执行

报错内容
show create table error, column "Create Table" not found

报错截图
image
image

@HuangWeiCen HuangWeiCen added the bug Something isn't working label Jan 19, 2022
@sjjian sjjian modified the milestones: v1.2202.0, v1.2203.0 Feb 17, 2022
@sjjian sjjian removed this from the v1.2203.0 milestone Mar 21, 2022
taolx0 pushed a commit that referenced this issue Sep 29, 2022
use the minimum of MaxPreQueryRows and PageIndex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants