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

update不支持别名 #249

Closed
czxin788 opened this issue Jul 23, 2020 · 0 comments
Closed

update不支持别名 #249

czxin788 opened this issue Jul 23, 2020 · 0 comments

Comments

@czxin788
Copy link

czxin788 commented Jul 23, 2020

描述

update 的表名有别名,会报字段不存在的错误。其实字段是存在的,去掉表的别名才行。

重现

[root@sql-audit archery]# docker exec -it goinception /bin/sh

/ # ./goInception -V
Release Version: v1.2.3-14-g67e1ed1-dirty
Git Commit Hash: 67e1ed10c7d748401f48dd5e51ed115f64d8acd8
Git Branch: master
UTC Build Time: 2020-07-23 01:18:56
GoVersion: go version go1.12.17 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false

UPDATE
diagnosis a
set
create_time =''
报错如下:
列 'diagnosis.create_time' 不存在.
请指定where条件.

UPDATE
diagnosis
set
create_time =''
去掉表的别名,就能通过了

image
image

环境

  • 数据库: mysql
  • 版本: 5.7.22

参数

hanchuanchuan added a commit that referenced this issue Jul 23, 2020
fix: 修复update指定表别名时审核错误的问题(fix #249)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant