feat: refs #6023 Added SELECT FOR UPDATE
This commit is contained in:
parent
9f92bc4b4c
commit
b7da144967
|
@ -48,6 +48,13 @@ module.exports = Self => {
|
||||||
if (tx) await tx.rollback();
|
if (tx) await tx.rollback();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await Self.rawSql(`
|
||||||
|
SELECT id
|
||||||
|
FROM account.user
|
||||||
|
WHERE id = ?
|
||||||
|
FOR UPDATE`, [user.id], myOptions);
|
||||||
|
|
||||||
await models.AccountConfig.syncUser(userName, password);
|
await models.AccountConfig.syncUser(userName, password);
|
||||||
await models.UserSync.destroyById(userName, myOptions);
|
await models.UserSync.destroyById(userName, myOptions);
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
|
|
Loading…
Reference in New Issue