Replies: 1 comment
-
老版本升级新部署的sqle audit_plan_report_sqls_v2表增加number字段,修改方式:
DELIMITER $$
CREATE PROCEDURE updateAuditPlanReport()
BEGIN
DECLARE report_end_flag int DEFAULT 0;
DECLARE last_report_id int DEFAULT 0;
DECLARE num int DEFAULT 1;
DECLARE val_id int(10) unsigned;
DECLARE val_audit_plan_report_id int(10) unsigned;
DECLARE val_number int(10) unsigned;
DECLARE cur_report CURSOR FOR SELECT id,audit_plan_report_id,number FROM sqle.audit_plan_report_sqls_v2 WHERE number IS NULL AND deleted_at IS NULL;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET report_end_flag=1;
OPEN cur_report;
FETCH cur_report INTO val_id,val_audit_plan_report_id,val_number;
WHILE report_end_flag <>1 DO
IF val_audit_plan_report_id!=last_report_id THEN
SET num=1;
SET last_report_id=val_audit_plan_report_id;
END IF;
UPDATE sqle.audit_plan_report_sqls_v2
SET number=num
WHERE id=val_id;
SET num=num+1;
FETCH cur_report INTO val_id,val_audit_plan_report_id,val_number;
END WHILE;
END;
$$
DELIMITER ;
CALL updateAuditPlanReport(); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature
[#565] 支持 TiDB 类型数据库审核【企业版】
[#573] 新增5条TiDB专属规则【企业版】
[#568] SQL查询支持查看数据字典和执行计划,审核SQL支持进行SQL分析【企业版】;
[#589] SQLE license内容调整,支持根据数据库类型进行细分限制【企业版】;
[#606] 登录页面样式调整;
Improvement
[#633] 工单的审核通过率百分比仅展示小数点后2位;
[#628] 优化新增审核规则模版或者是克隆审核规则模版都很耗时的问题。
Bugfix
[#563] 修复SQLE scanner 解析带有空otherwise标签的 mybatis XML时异常崩溃(社区反馈)
[#597] 修复在SQLE使用MySQL8.0作为业务库时,通过open api往审核任务中添加SQL时,接口报错报错的问题(社区反馈);
[#594] 修复使用数据源创建过工单之后,对应的删除数据源若删除会导致工单详情页面打开提示未知错误的问题;
[#641] 修复审核时如果当前连接的表存在但是表格是个空表,审核失败的问题;
[#634] 修复SQL查询时执行计划tab页无法关闭的问题;
[#624] 修复未设置运维时间时,无法选择所有的时间进行定时上线的问题;
[#621] 修复Oauth2账户绑定成功后,再次登录依旧跳转到用用户绑定界面的问题;
[#597] 修复当SQLE后端存储未MySQL8.0版本时,通过open api往审核任务中添加sql时,部分数据报错的问题;
[#639] 修复对特定语法(choose内不带otherwise标签)的Mybatis 文件审核时程序panic的问题。
This discussion was created from the release v1.2206.0.
Beta Was this translation helpful? Give feedback.
All reactions