Files
phabricator/resources/sql/autopatches
epriestley 5d1359d78f Fix an issue where repository message counts would never reset
Summary:
Fixes T11705. I did not realize that `ON DUPLICATE KEY UPDATE` was order-dependent, so the "reset" clause of this `IF(...)` never actually worked.

Reorder it so we check if we're changing the message type //first//, then actually change the message type.

This makes the count reset properly when a failing repository succeeds, or a working repository fails.

Test Plan:
  - On `master`, forced a working repository to fail a `bin/repository update`, saw the message change types (expected) but keep the old count (wrong!).
  - With this patch, repeated the process and saw the count reset properly.
  - Ran the patch, verified counts reset to 0.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11705

Differential Revision: https://secure.phabricator.com/D16623
2016-09-28 15:02:26 -07:00
..
2015-05-22 21:16:39 +10:00
2014-05-09 12:47:21 -07:00
2015-05-22 21:16:39 +10:00
2015-05-22 21:16:39 +10:00
2015-05-22 21:16:39 +10:00
2015-05-22 21:16:39 +10:00
2015-05-22 21:16:39 +10:00
2015-05-22 21:16:39 +10:00
2015-05-22 21:16:39 +10:00
2014-09-11 13:38:58 -07:00
2015-05-22 21:16:39 +10:00
2014-11-07 12:29:24 -08:00
2015-05-22 21:16:39 +10:00
2015-05-22 21:16:39 +10:00
2015-06-03 18:42:33 -07:00
2015-06-17 07:17:14 +10:00
2015-06-17 07:17:14 +10:00
2015-07-22 13:37:20 -07:00
2015-07-22 13:35:34 -07:00
2015-07-22 13:35:34 -07:00
2015-07-22 13:35:34 -07:00
2016-07-27 12:22:57 -07:00