I would be checking for voltage on the heater pins at the O2 sensor connectors. Both sensors share the same power supply for heater circuit, it's a 10A fuse labeled "ENG BAR 3" in the underhood fuse box by the battery so if that fuse goes out then you will end up with a code for both sensors. I would be very suspicious on that spliced on connector, a car with federal emissions DOES only have two sensors and upstream sensor should have 5 pins, not 4. Pull the tape off and see what it looks like. For whatever reason, Mazda stupidly made two of the wires the same color so I'm willing to bet that whoever spliced the connector on connected those wires together, which probably blew the fuse. Get the correct upstream connector, wire it all in, and install the correct sensor. You may have to go to the dealer or junkyard for the connector as I couldn't find a listing for it aftermarket. The rear sensor is also listed as being a different part between federal and CA emission so I would make sure that one is correct as well.