quote; First of all, it should not go into the wall, and secondly, it should not be PVC. Normally, these pipes are just 3/4" galvanized, although any metal would be OK, and the just go to just above the floor. They can be directed to a floor drain, but not connected solidly
I assume you are not a plumber or you would not have made EITHER of those statements.
1. The drain from a T&P valve MUST discharge at a point where it will NOT cause damage, and that point is often outside the room or building where the heater is located so it OFTEN goes into the wall.
2. Discharging onto the floor often creates a situation where it COULD cause damage.
3. The only way to connect to a pipe in the wall is to make a "solid" connection.
In this area almost ALL heaters have a solid connetion to a pipe in the wall which leads outside the building. This picture is not good enough to tell whether that is a PVC pipe or even if the T&P valve discharge is connected to it.
As far as this situatation is concerned, since that pipe will seldom have water in it, and it should NEVER be under pressure, about the only way those joints could develop that much calcification would be if they were NOT soldered in the first place and are just stuck together.