MDL-61028 core_search: Fix SELECT bug affecting Oracle