We bought a 'corporate' used CX-5 with about 7500 miles on it in Sept. 2012. This has happened to me twice (as of today it's still in the shop for the second repair). The first time we brought it in (10/22/12) they did a computer update. It happened again on 1/02/13 when I was merging unto a freeway. The tranny would not move up to 2nd gear, the tach went up to 3500-4000 rpms, the car would not move, the tsc, tpms, AT and engine lights all went on. I was able to move off of the freeway and turned off the vehicle. I sat for a few minutes and turned it back on. All the lights stayed on but the car moved and shifted smoothly so I was able to drive home and then to the dealer. As this was the second time I took it to them for this problem they checked with Mazda tech support about it. I was informed later that day that they needed to get a valve body and a solenoid for the tranny and that it would take about a week for them to get the parts. They also mentioned that Mazda was aware of similar incidents with the transmission but that they, the dealer I bought it from, had not had any other occurence with it. I find this strange since Mazda supposedly had this car for over 7,500 miles before I bought it and I've barely had it for 500 miles and this happened to me twice. I'm still waiting to hear back from them.
I just got off the phone with the dealer and ETA for parts is either today 1/10 or tomorrow 1/11.