Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5.46, 10.0.19, 10.0(EOL), 10.1(EOL)
-
None
-
5.5.48-0
Description
There is a table with persistent computed column:
CREATE TABLE `some_table` (
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
`name` varchar(254) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
`name_hash` varchar(64) COLLATE utf8mb4_unicode_ci AS (sha2(name, 256)) PERSISTENT,
|
PRIMARY KEY (`id`)
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
I am updating name value using complex query which contains joins, this is much simplified version which does not work as well:
update some_table join some_other_table using(id) set name = concat(name, '+1') where some_table.id in (2051,2041)
|
It updates name values but name_hash remains untouched. I've tried different cases with join and all of them do not update computed column. Updates without joins work fine.