Sounds like an incorrectly scoped WHERE (or maybe even JOIN?) on a SQL query.
Plus inadequate (automatic) testing, that should have caught the problem before it was committed to the main development tree.
Plus inadequate (automatic) testing, that should have caught the problem before it was committed to the main development tree.