Issue #2128271 by kenorb: Fixed PDOException - Specified key was too long. Port to 7.x-2.x of the patch from #1838014.