Large issue or not depends on the scale of your application. At worst it is less then a favorable user experience. The point is, checking first builds in the capability for a race condition. The constraint stops dirty data of course, so it relates to the user experience.
Sure, many apps do the username check first by whatever method. Many apps also use MySQL_* and put variables in the queries. That doesn’t make it ok.
In any of those cases, a potential race condition affecting the user experience is built into the app. There is no way it cannot be. There can only be one person with a particular username or domain name no matter how many people passed the availability check. The first request to make it to the server gets the name. In PHP, an Exception is thrown all by itself without a programmer throwing it. How it is handled is something else. Without seeing the code I couldn’t say, such as the case of domain names.
Unless I am mistaken, what you are talking about as anti-pattern or Exceptions for program flow doesn’t apply. That is the programmer throwing the exceptions. That is not the case here.
A duplicate constraint violation is an Exception in PHP all by itself so your previous statement about “actually aren’t exceptions” is incorrect.
Let’s just take it to code, as it always says what is what. We already agree on the duplicate constraint in place. Lets take 100 people that want the username “BOB” which is not currently in the DB. A username check will tell ALL 100 people they can have the name “BOB”. They all submit at the same time. The race is on. Only one of them (race winner) gets the username registered to them, the other 99 have a failure EVEN THOUGH the app said the name was available.
Tell me, how would you, @astonecipher solve this problem?