Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: use alternative locking syntax that both MySQL and MariaDB support (#6462)

Estelle Poulin2cd3d09391df
diff --git a/store/db/mysql/reaction.go b/store/db/mysql/reaction.go
index fb537f304..a31327258 100644
--- a/store/db/mysql/reaction.go
+++ b/store/db/mysql/reaction.go
@@ -31,7 +31,7 @@ func (d *DB) UpsertReaction(ctx context.Context, upsert *store.Reaction) (*store
SELECT ?, memo.id, ?
FROM memo
WHERE memo.id = ?
- FOR SHARE
+ LOCK IN SHARE MODE
`, upsert.CreatorID, upsert.ReactionType, upsert.MemoID)
if err != nil {
return nil, err