if(!lastFilterName.isEmpty())
ss << " AND w.won IN (SELECT won FROM "
<< lastFilterName << ')';
Incredible how a line of code, in service for almost 13 years without incident, can only be called in a one in a million circumstance and bomb.
It's part of some generated SQL and that particular case is never reached. It's a one in a million shot the temporary table referenced by lastFilterName exists at that stage. (It's complicated)
In this case it was and the w.won column blew massive chunks because NOTHING in that generated SQL ever selected anything and referenced it as as w. (Should have been s.). Probably a copy/paste thing we did years ago and we just didn't catch it…because that line was never, ever reached. In hundreds of installations. For 13 years. Until two hours ago in Alabama.
This is why I live in outer space and Skyrim after hours.