Sure, there is oxygen in the barrel, but there is a metal piston called a bullet between that oxygen and the powder charge, which pushes that oxygen out of the barrel before it meets the powder gases!
Sunray, do you know ANY chemistry? Gunpowder in a cartridge does not burn with air. In a full rifle charge, the air (21% oxygen) between the grains in the case may contribute a tiny bit to burning the powder, but it is really minute compared to the mass of the powder, and any reaction between that air and the powder would be complete before the bullet was much into the bore, so it would be unaffected by barrel length. The real oxidizer in the reaction is the "nitro" in nitrocellulose and nitroglycerin, not gaseous oxygen, which is why nitromethane-powered dragsters produce such enormous horsepower compared to any other piston engines. You could fill your cases with pure nitrogen or argon before seating the bullet, and I'll bet the difference in velocity would be immeasurable. But if you used dry argon and sealed the primer and the neck, that ammo would have a heck of a shelf life!