Features That MySQL Does Not Support

This section describes features not supported by MySQL that are found in some other databases. Some of the items in this list are scheduled for implementation in the future.

  • Stored procedures and triggers. A stored procedure is SQL code that is compiled and stored in the server. It can be executed later by the server without having to be sent from the client and parsed again. You can also make changes to a procedure to affect any client applications that use it. Trigger capability allows a stored procedure to be activated automatically when some event occurs, such as a record being deleted from a table. For example, you might do this if you wanted to regenerate some complex summary of which the record was a part, to keep the summary up to date. The current timetable is to implement stored procedures in MySQL 5.

  • Views. A view is a logical entity that acts like a table but is not one. It provides a way to look at columns from different tables as though they're all part of the same table. Views are sometimes called virtual tables. The current timetable is to implement views in MySQL 5.

  • Record-level privileges. MySQL supports various levels of privileges, from global privileges down to database, table, and column privileges. It does not support record-level privileges. However, you can use the GET_LOCK() and RELEASE_LOCK() functions in your applications to implement cooperative record locks. The procedure for this is described in the entry for GET_LOCK() in Appendix C.

  • '--' as a comment. This comment style is not supported because it's an ambiguous construct, although as of MySQL 3.23.3, a comment beginning with two dashes and a space is accepted. See the "Writing Comments" section earlier in this chapter for more information.