Add session-inside-database test.
Minor session tweak.