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

[bug] ALTER TABLE CHANGE 修改列名后再次引用仍存在 #150

Closed
earl86 opened this issue Jan 7, 2020 · 0 comments
Closed

[bug] ALTER TABLE CHANGE 修改列名后再次引用仍存在 #150

earl86 opened this issue Jan 7, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@earl86
Copy link

earl86 commented Jan 7, 2020

描述
对问题简单清晰的描述
alter 语句审核 bug
重现
模拟重现的步骤
1。在db里前提建立wtest表。结构如下。
drop table wtest;
CREATE TABLE wtest (
id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
xxxxx bigint(20) NOT NULL,
ttttt bigint(20) NOT NULL,
status tinyint(4) NOT NULL,
start_time int(11) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

2。在审核平台上 审核以下语句 不报错。
ALTER TABLE wtest
CHANGE COLUMN status teststatus tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态' AFTER xxxxx,
MODIFY COLUMN start_time int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '开始时间' AFTER status;

实际执行应该报错 (1054, "Unknown column 'status' in 'wtest'")

环境

  • 数据库: [mysql/mariadb]
  • 版本: [例如 5.7.21]

参数
可能与问题相关的设置参数

@hanchuanchuan hanchuanchuan added the bug Something isn't working label Jan 8, 2020
@hanchuanchuan hanchuanchuan changed the title bug [bug] ALTER TABLE CHANGE 修改列名后再次引用仍存在 Jan 8, 2020
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