I don't often hear my Macbook accelerate and start heating up, but today I was installing mariadb through Homebrew and it required compiling. I have a mid-2012 15" Macbook pro with a high-resolution screen (the version released alongside with the Retina Macbooks)
The charger was connected but the light was green, so the battery was done charging already. When the compiling phase began, I heard my fan rocket to a very high speed. The charger was still connected (could that have had an impact the temperature?).
When I installed smcfancontrol it registered temperatures of 100–105 °C (212-221 °F) and the fan was running at more than 6000 RPM.
Is this normal? Reading around I read mentions of the maximum temperature before heat damage occurs being 95 °C, and my Mac went well over a hundred for a few minutes.
Edit: When idle, the Macbook runs at 66 °C and 2000 RPM with the charger disconnected, and around the same temperature with it connected.