Skip to content

Commit 9819845

Browse files
mitsuhikomattrobenolt
authored andcommitted
Merge pull request #3032 from getsentry/bugfix/mysql-counters
Fixed counters in MySQL
1 parent d2868c0 commit 9819845

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sentry/models/counter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ def increment_project_counter(project, delta=1):
7777
(project_id, value)
7878
values (%s, @new_val := %s)
7979
on duplicate key
80-
update value = @new_val := value + %s;
81-
select @new_val;
80+
update value = @new_val := value + %s
8281
''', [project.id, delta, delta])
82+
cur.execute('select @new_val')
8383
return cur.fetchone()[0]
8484
else:
8585
raise AssertionError("Not implemented database engine path")

0 commit comments

Comments
 (0)