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

SQLE panic when trigger pt-osc suggestion #130

Closed
sjjian opened this issue Dec 8, 2021 · 3 comments
Closed

SQLE panic when trigger pt-osc suggestion #130

sjjian opened this issue Dec 8, 2021 · 3 comments
Assignees
Labels
bug Something isn't working verified the issue all pr is verified
Milestone

Comments

@sjjian
Copy link
Member

sjjian commented Dec 8, 2021

SQLe Version
main 201d68a

Describe the bug
SQLE panic when trigger pt-osc suggestion

To Reproduce
Steps to reproduce the behavior:

  1. 创建测试库表
CREATE DATABASE `t1`;
CREATE TABLE `t1`.`fruits` (
  `id` bigint(11) NOT NULL,
  `uid` int(11) NOT NULL DEFAULT '0',
  `name` varchar(100) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) 
  1. enable rule "改表时,表空间超过指定大小(MB)审核时输出osc改写建议", 可以将配置最大表空间调小,例如:“0",降低触发条件
  2. 提交审核工单,SQL语句:
alter table fruits add column create_date TIMESTAMP default current_timestamp
  1. 点击审核,SQLE 崩溃
    image

Expected behavior
正常提示 pt-osc 建议

@sjjian sjjian added the bug Something isn't working label Dec 8, 2021
@sjjian sjjian added this to the v1.2112.0 milestone Dec 8, 2021
@sjjian
Copy link
Member Author

sjjian commented Dec 8, 2021

目测是 Inspect.inst对象在重构过程中丢失了赋值

@Marcus9530
Copy link
Collaborator

Version:
"main 4e6cf6f"
复现成功
1.创建测试库表
CREATE DATABASE t1;
CREATE TABLE t1.fruits (
id bigint(11) NOT NULL,
uid int(11) NOT NULL DEFAULT '0',
name varchar(100) NOT NULL DEFAULT '0',
PRIMARY KEY (id)
)
2.enable rule "改表时,表空间超过指定大小(MB)审核时输出osc改写建议", 可以将配置最大表空间调小,例如:“0",降低触发条件
3.提交审核工单,SQL语句:
alter table fruits add column create_date TIMESTAMP default current_timestamp
4.查看sqle的pid文件发现进程已经发生了变化
image

image

@Marcus9530
Copy link
Collaborator

Version:
"release-1.2112.x-ee cc48d26174ad061aefcd600aada7a38a2e5f8ec9"
验证通过
验证步骤

1.创建测试库表
CREATE DATABASE t1;
CREATE TABLE t1.fruits (
id bigint(11) NOT NULL,
uid int(11) NOT NULL DEFAULT '0',
name varchar(100) NOT NULL DEFAULT '0',
PRIMARY KEY (id)
)
2.enable rule "改表时,表空间超过指定大小(MB)审核时输出osc改写建议", 可以将配置最大表空间调小,例如:“0",降低触发条件
3.提交审核工单,SQL语句:
alter table fruits add column create_date TIMESTAMP default current_timestamp
4.查看sqle的pid文件没有发生任何变化
image
image

@Marcus9530 Marcus9530 added the verified the issue all pr is verified label Dec 31, 2021
taolx0 pushed a commit that referenced this issue Sep 29, 2022
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