Fixing mysql adapter to correctly handle start and end dates split across years.