Commit bde5a88d authored by Vincent Pelletier's avatar Vincent Pelletier

Revert "Products.CMFActivity.Activity.SQLBase: Drop "FOR UPDATE"."

This reverts commit 89aa2a6b.
The assumption that FOR UPDATE was unnecessary is wrong: when SQLDict
reserves similar activities, it will race against these primo-reservations.
So this change actually opens the possibility for duplicate activity
reservation.
Revert this change until (hopefully) a better fix is implemented.
parent e53f712e
...@@ -774,7 +774,8 @@ CREATE TABLE %s ( ...@@ -774,7 +774,8 @@ CREATE TABLE %s (
b" processing_node=0 AND" b" processing_node=0 AND"
b" %s%s" b" %s%s"
b" ORDER BY priority, date" b" ORDER BY priority, date"
b" LIMIT %i" % args, b" LIMIT %i"
b" FOR UPDATE" % args,
0, 0,
)) ))
else: else:
...@@ -787,6 +788,7 @@ CREATE TABLE %s ( ...@@ -787,6 +788,7 @@ CREATE TABLE %s (
b" %s%s" b" %s%s"
b" ORDER BY priority, date" b" ORDER BY priority, date"
b" LIMIT %i" b" LIMIT %i"
b" FOR UPDATE"
b")" % args).format b")" % args).format
result = Results(query( result = Results(query(
b"SELECT *" b"SELECT *"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment