I'd like to know what happened to the original OP. As far as I understand, it is the metal flown that determines the mileage obtained. Hence, flying LY on an LX codeshare should earn exactly zero, since LY is not part of M&M (or *A).
I'd be happy to be proven wrong, of course.