You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
描述
生成虚拟列表的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回滚测试';
描述
生成虚拟列表的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
WHEREid
=1-- 提交delete删除回滚工单并执行,报异常
环境
参数
可能与问题相关的设置参数
The text was updated successfully, but these errors were encountered: