But the mechanics are all the same- adding new sugar to the beer so the yeast eats it and produces co2....the only difference is the container you are doing it in, be it a bottle or a pressure barrel like you have or sugar priming in a keg, ultimately it's all the same.
Although what you did isn't optimal...meaning it would have been more sanitary had you boiled it, you are adding it to fermented beer so there is less of a chance that there's a problem, and like Priemus had said, he's added sugar straight with no infection issues.
Like I said earlier sometimes trying to "fix" something that may or may not be a problem, can cause more problem....had you added more sugar like you thought you would more than likely over carb your beer- had that been in a bottle, that would be dangerous, as it is in a pressure barrel it could have blown the gasket or whatever at worse, or just made gushy beer at best. Stirring fermented beer is NEVER a good idea, that runs the risk of causing oxydation of the beer. Oxygen + Fermented beer= Liquid cardboard. That would limit the time the beer would be drinkable and not stale....
The yeast is really good at finding food (sugar) regardless of whether we mix it or not....it's gonna find it.
That's way I don't recommend people go back and try to "fix" something...it's often best to just relax and see how it turns out, because 99.9% of the time it turns out fine.
Read these stories to see what I mean.