2.补全uuid
update user u
inner join (select id, replace(uuid(),"-","") uuid from user ) r on r.id = u.id
SET u.uuid = r.uuid
where u.uuid = '' or u.uuid is null
当mysql字符集编码为uftmp4,查询replace(uuid(),"-","")一致,就是所有的uuid经过replace都会成相同的uuid
解决办法
replace(convert(uuid() using utf8mb4), '-','')