---
title: "Both Ways Bug Me"
url: https://daily.dev/posts/both-ways-bug-me-ixnffblrq
source_url: https://thedailywtf.com/articles/both-ways-bug-me
type: article
source: "The Daily WTF"
published: 2026-08-25T11:18:06.063Z
updated: 2026-08-25T11:18:22.108Z
tags: ["sql"]
reading_time: 2
upvotes: 3
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Both Ways Bug Me

**[The Daily WTF](https://daily.dev/sources/thedailywtf)** · 2 min read · 3 upvotes · 0 comments

## Summary

A production SQL query contained leftover debugging flags disguised as tautological boolean conditions, such as (1 = 0 OR (1 = 1 AND ...)), which let someone toggle whether the query returns all rows or filtered rows. The pattern likely originated as an analyst's ad hoc query that got frozen into a stored procedure, with the undocumented flags never touched since release, highlighting a broader observability gap in the codebase.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thedailywtf.com/articles/both-ways-bug-me>

## Similar posts on daily.dev

- [Qaudruple Negative](https://daily.dev/posts/qaudruple-negative-gvjx6zpq7) · The Daily WTF · 3 upvotes · 0 comments
- [SQL Has Rules You Don’t Notice Until Your Query Is Wrong](https://daily.dev/posts/sql-has-rules-you-don-t-notice-until-your-query-is-wrong-ue7ucmkyu) · Medium · 0 upvotes · 0 comments
- [Duplicate Reports](https://daily.dev/posts/duplicate-reports-bxbepwwum) · The Daily WTF · 0 upvotes · 0 comments

---

Tags: [#sql](https://daily.dev/tags/sql)

[View this post on daily.dev](https://daily.dev/posts/both-ways-bug-me-ixnffblrq)
