In earlier versions (tested in 17w16a) putting "execute @p ~ ~ ~ summon bat" in a command block summons a bat at the nearest players feet. in the current version the same command summons a bat inside the command block.
In earlier versions (tested in 17w16a) putting "execute @p ~ ~ ~ summon bat" in a command block summons a bat at the nearest players feet. in the current version the same command summons a bat inside the command block.
Another duplicate of MC-117319.