From 1b863b08f145385998aeed207ea05674c4fc04ee Mon Sep 17 00:00:00 2001 From: meiji163 Date: Tue, 22 Oct 2024 18:03:46 -0700 Subject: [PATCH] repoduce error in generate-columns-unique --- localtests/generated-columns-unique/create.sql | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/localtests/generated-columns-unique/create.sql b/localtests/generated-columns-unique/create.sql index 7a63dd984..83afc807d 100644 --- a/localtests/generated-columns-unique/create.sql +++ b/localtests/generated-columns-unique/create.sql @@ -3,6 +3,7 @@ create table gh_ost_test ( id int auto_increment, `idb` varchar(36) CHARACTER SET utf8mb4 GENERATED ALWAYS AS (json_unquote(json_extract(`jsonobj`,_utf8mb4'$._id'))) STORED NOT NULL, `jsonobj` json NOT NULL, + updated datetime DEFAULT NULL, PRIMARY KEY (`id`,`idb`) ) auto_increment=1; @@ -25,6 +26,11 @@ begin insert into gh_ost_test (id, jsonobj) values (null, '{"_id":13}'); insert into gh_ost_test (id, jsonobj) values (null, '{"_id":17}'); insert into gh_ost_test (id, jsonobj) values (null, '{"_id":19}'); - insert into gh_ost_test (id, jsonobj) values (null, '{"_id":23}'); - insert into gh_ost_test (id, jsonobj) values (null, '{"_id":27}'); + + update gh_ost_test set updated=NOW() where idb=5; + update gh_ost_test set updated=NOW() where idb=7; + update gh_ost_test set updated=NOW() where idb=11; + update gh_ost_test set updated=NOW() where idb=13; + update gh_ost_test set updated=NOW() where idb=17; + update gh_ost_test set updated=NOW() where idb=19; end ;;