Even if there's no code, Mazda dealer should try to resolve whatever the issue presented by the customer under warranty. Contact Mazda North American Operations Customer Experience Center if your dealer remfuses to fix your issue.
bad gas? water in fuel? fouled spark plug? carbon build up? try one of those PEA fuel cleaner combo products (like techron or gumout) for 2 or 3 tank could be something simple like that.