Years ago, the military wouldn't admit individuals for pilot training if they had fillings. This was due to the potential for air (or pressure) to get trapped in the filling and casue pain as the pilot ascended.
I spent three weeks getting a root canal about eight years ago. The evening they finished the last visit, I got a late call for a morning deployment. I was on the road first thing, and that evening spoke to my wife, who had a call from the dentist saying I needed to come back in for them to have a look at something. This was in February. I told them I might be able to make it back by October (turned out to be December, that year).
I found that I couldn't hardly chew; every time I bit down, even on the softest of foods, I got shooting pains like someone had an ice pick in the nerve of an open tooth. It really hurt, and the usual over the counter painkillers weren't helping much. The dentist assured me that there was nothing wrong, he just wanted to "have a look."
My duties prevented finnding and seeing a dentist, and I couldn't take any significant painkillers (nor would I) for the same reasons. The dentist assured me that nothing was wrong that would prevent my flying, though I did experience a fair amount of discomfort.
One day I had a break, and while scheduling a dental visit wasn't feasible, making several jumps was. On the way to altitude, somewhere around 15,000' the pain in my jaw built considerably, and then I felt a pop, as though I'd been punched in the jaw. The pain ended abruptly, and we were soon at 18,000 for the jump. The jump went uneventfully, but when I got on the ground I found I had shooting pains down the side of my neck and I couldn't turn my head in one direction.
During a later visit, x-rays revealed a large air pocket beneath a filling. A bigger problem was the root canal itself; the root in the affected tooth was gone, but the dentist had missed going down into the bottom of the tooth with the spike, and instead drilled into the nerve of the adjacent tooth. The spike was driven down that hole, and every time bit down, I was driving that spike into the live nerve on the other tooth. Apparently it was through this same passage that the air vented as I climbed to altitude. I don't know why I couldn't turn my head. That went away in a few days.
I had an overwhelming pain many years ago while I was living in Australia. Two physicians thought it was something serious, and scheduled me for a cat scan. Not coming up with anything, one sent me to a dentist, who found a massive infection in a wisdom tooth. My tooth didn't hurt, but I had pounding headaches that felt completely unrelated to anything dental, that no painkiller would touch. The tooth was pulled, the infection treated, and the pain went away in short order. Dental pain can manifest itself as all sorts of things that would never lead you to suspect it's a tooth issue.