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

生成虚拟列表delete操作生成的回滚无法正常执行 #324

Closed
skyecool opened this issue Mar 19, 2021 · 1 comment
Closed

生成虚拟列表delete操作生成的回滚无法正常执行 #324

skyecool opened this issue Mar 19, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@skyecool
Copy link

描述
生成虚拟列表的delete操作生成的insert回滚语句无法正常执行,原因是生成的insert 回滚语句包含了虚拟的的字段数据,虚拟列不能指定数据
Execute: The value specified for generated column 'project' in table 't1' is not allowed.

重现
模拟重现的步骤

-- 创建测试表
CREATE TABLE t1 (
id int(10) unsigned NOT NULL primary key auto_increment comment "主键",
c1 int(10) NOT NULL default 1 comment "c1",
jdoc json DEFAULT NULL comment "json类型字段",
project varchar(30) GENERATED ALWAYS AS (json_unquote(json_extract(jdoc,'$."project"'))) VIRTUAL NOT NULL comment "json生成虚拟列",
author varchar(15) GENERATED ALWAYS AS (json_unquote(json_extract(jdoc,'$."author"'))) VIRTUAL NOT NULL comment "json生成虚拟列",
url varchar(200) GENERATED ALWAYS AS (json_unquote(json_extract(jdoc,'$."url"'))) VIRTUAL NOT NULL comment "json生成虚拟列",
c2 int(11) GENERATED ALWAYS AS ((c1 + 1)) STORED comment "json生成虚拟列"
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 comment '生成虚拟列表delete回滚测试';

-- 写入测试数据
INSERT INTO t1(jdoc,c1) VALUES('{"project": "goInception","author": "hanchuanchuan", "url": "https://github.com/hanchuanchuan/goInception"}',100);

-- delete删除测试
DELETE FROM t1 WHERE id=1

-- 提交delete删除回滚工单并执行,报异常

image

环境

  • 数据库: MySQL
  • 版本: 5.7.32

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

@hanchuanchuan
Copy link
Owner

该问题已修复。
可升级到v1.2.4-49及之后版本后重试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants