Transmission Control Module (TCM) faults are not unknown on these early Mazda 3s. Symptoms usually involve erratic shifting, a failure to select gear at all and having the car go into limp-home mode.
You could take your complaint directly to Mazda's customer relations people. You might get a hearing because the warranty had only just expired. We have heard reports of problems with shift solenoids ...