A reader named Codemonkey found a SQL query running in production whose WHERE clause embeds its own debugging switches: (some conditions) AND (1 = 0 OR (1 = 1 AND (other conditions))).

query.sql
WHERE (some conditions)
  AND (1 = 0 OR (1 = 1 AND (other conditions)))

The mechanics are grimly elegant. Flip the first equality and the query returns everything regardless of the real conditions. Flip the second and it returns nothing at all. The second option's practical value is questionable.

The likely origin story is familiar: an analyst's ad hoc query got promoted into a stored procedure that now runs on a schedule. The flags have never been touched since release, and they are documented nowhere. Remy Porter notes that constructs like this usually signal a deeper observability problem in the codebase.