Changeset View
Changeset View
Standalone View
Standalone View
resources/sql/autopatches/20151109.repository.coverage.1.sql
- This file was added.
USE {$NAMESPACE}_repository; | |||||
DELETE x FROM repository_coverage x | |||||
epriestley: Bizarre. Well maybe `USE` (vs `use`) at least. | |||||
Not Done Inline ActionsDone. ddfisher: Done. | |||||
LEFT JOIN repository_coverage y | |||||
Not Done Inline ActionsFor consistency, just namespace these tables explicitly: DELETE x FROM {$NAMESPACE}_repository.repository_coverage ... epriestley: For consistency, just namespace these tables explicitly:
```
DELETE x FROM… | |||||
Not Done Inline ActionsIt turns out that doesn't work for reasons that I completely don't understand. mysql> DELETE x FROM phabricator_repository.repository_coverage x -> LEFT JOIN phabricator_repository.repository_coverage y -> ON x.branchID = y.branchID -> AND x.commitID = y.commitID -> AND x.pathID = y.pathID -> AND y.id > x.id -> WHERE y.id IS NOT NULL; ERROR 1046 (3D000): No database selected And I get the same error when running through ./bin/storage. If I change the DELETE x to SELECT * it runs fine. ddfisher: It turns out that doesn't work for reasons that I completely don't understand.
```mysql>… | |||||
ON x.branchID = y.branchID | |||||
AND x.commitID = y.commitID | |||||
AND x.pathID = y.pathID | |||||
AND y.id > x.id | |||||
WHERE y.id IS NOT NULL; |
Bizarre. Well maybe USE (vs use) at least.