primary and unique key check within triggers‏

I’m getting some errors on the primary and unique key check within on my insert triggers. Does any one know how the order of the check is performed internally by mysql?

Any help is much appreciated