Fixed bug #12603: sql_query does not respect "mapping"