In principle, the usual response to your type of question is that it's a problem that could be solved if all the parties of interest could agree on a standard to follow. For SQL DBs, there is an ISO/IEC SQL standard (1992,1999,2003,2008,2011), so it's not that there is a lack of a standard. If you look at the various issues brought up in this thread and other postings, you will find long standing bugs (and waves of duplicates & complaints) that have been filed for all of them on bugs.mysql.com, so it's not that there isn't interest in fixing MySQL; likely it's just not been a high priority for the project, and the value added for existing apps that already "work" with MySQL isn't there. Also, what motivation is there for MySQL--which is arguably the most popular open-source DB--to change to be more compliant?
To answer your question concretely, which I read as: "Why can't we easily change out a SQL RDBMS as if it were a common component?" I would say:
(1) Lack of standards compliance; in this case the SQL standard being the relevant one that MySQL doesn't follow.
(2) DB specific extensions that many apps have become to rely on, often also caused by the previous point: apps having to rely on non-standard extensions due to the non-existence of a standard feature that could have otherwise been used. An earlier poster pointed out a few of these above (INSERT IGNORE, ON DUPLICATE KEY UPDATE, INSERT REPLACE, ...).
(3) Due to a combination of both points above, supporting software in your favorite language or ORM either doesn't exist, is incomplete for a particular DB, or lacking in cross-platform support (e.g. the mylang-pgsql driver for Linux works but doesn't on Windows, OS X or some other major commercial UNIX OS like Solaris or AIX).
(4) Finally, for open-source DBs there is practically no code re-use that matters; I see this as very unfortunate, because it could be a unique strength that only open-source projects can take advantage of. One reason for this is legal: different open-source DBs have different or conflicting licenses. But regardless of that (putting on flame suit now) much of the reason for a lack of code re-use is due to the fact that C and C++ make it pretty difficult to do well--which is a point I find true across all codebases in general (i.e. different C, C++ codebases share very very little code).
To answer your question concretely, which I read as: "Why can't we easily change out a SQL RDBMS as if it were a common component?" I would say:
(1) Lack of standards compliance; in this case the SQL standard being the relevant one that MySQL doesn't follow.
(2) DB specific extensions that many apps have become to rely on, often also caused by the previous point: apps having to rely on non-standard extensions due to the non-existence of a standard feature that could have otherwise been used. An earlier poster pointed out a few of these above (INSERT IGNORE, ON DUPLICATE KEY UPDATE, INSERT REPLACE, ...).
(3) Due to a combination of both points above, supporting software in your favorite language or ORM either doesn't exist, is incomplete for a particular DB, or lacking in cross-platform support (e.g. the mylang-pgsql driver for Linux works but doesn't on Windows, OS X or some other major commercial UNIX OS like Solaris or AIX).
(4) Finally, for open-source DBs there is practically no code re-use that matters; I see this as very unfortunate, because it could be a unique strength that only open-source projects can take advantage of. One reason for this is legal: different open-source DBs have different or conflicting licenses. But regardless of that (putting on flame suit now) much of the reason for a lack of code re-use is due to the fact that C and C++ make it pretty difficult to do well--which is a point I find true across all codebases in general (i.e. different C, C++ codebases share very very little code).