Issue 5842 temp tables