r9403: Rework conditions to be CommonSQL backward compatible