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

add操作无法命中merge_alter_table检测 #79

Closed
hhyo opened this issue Sep 3, 2019 · 1 comment
Closed

add操作无法命中merge_alter_table检测 #79

hhyo opened this issue Sep 3, 2019 · 1 comment

Comments

@hhyo
Copy link
Contributor

hhyo commented Sep 3, 2019

描述
对同一表的alter操作,如果是ADD 则无法检测出来,modify和change都正常检测

重现

  • 语句
create table visitor1 (id int not null comment 'xxx',createtime datetime(6) default current_timestamp() comment 'xxx',primary key(id)) comment 'xxxxx';
alter table visitor1 add create_at datetime(6) default current_timestamp() comment 'xxx';
alter table visitor1 add update_at datetime(6) default current_timestamp() comment 'xxx';


create table visitor2 (id int not null comment 'xxx',createtime datetime(6) default current_timestamp() comment 'xxx',primary key(id)) comment 'xxxxx';
alter table visitor2 modify createtime datetime(6) default current_timestamp() comment 'xxx';
alter table visitor2 modify createtime datetime(6) default current_timestamp() comment 'xxx';
  • 结果
    image

环境

  • 数据库: [mysql/mariadb]
  • 版本: 5.7.21
  • goInception:v1.0.5

参数


mysql> inception get variables like '%merge_alter_table%';
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| merge_alter_table | true  |
+-------------------+-------+
1 row in set (0.00 sec)
@hhyo
Copy link
Contributor Author

hhyo commented Sep 3, 2019

尝试提交PR,给我点时间,hh

hanchuanchuan added a commit that referenced this issue Sep 5, 2019
update: 修复add操作无法命中merge_alter_table检测的问题 fix #79
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