Use of boost::make_shared in query

Second pass.