MySQL Notes
Beginning with version 5.0.3, MySQL now includes a "real" TRUNCATE
command for InnoDB tables, similar to that provided by Oracle and PostgreSQL.
George-Cristian Bîrzan (gcbirzan {at} constanta dot rdsnet dot ro) wrote to point out that it is affected by
the following interesting gotcha:
As a follow-up to this article, MySQL has - according to this CNET report - renewed the InnoDB contract inherited by Oracle when it purchased the Finnish company.
MySQL CEO Marten Mickos is quoted as saying "Oracle told us that it's business as usual--they don't want to slow us down, and they will fix bugs" - which on the face of it is good news for anyone with a long term investment in InnoDB technologies.
The article does not say whether Oracle will fix some of the more fundamental issues with InnoDB's MySQL engine.
In related news, MySQL is pushing ahead with development of its own transactional storage engine following its acquisition of Netfrastructure, one of the original InterBase developers and a member of the Firebird project.
Many of the gotchas in pre 5.0 MySQL versions stem from the fact that operations silently failed without any type of error message or warning. That situation has improved with 5.0, with explicit warnings being emmitted on some operations, such as when data is truncated, making it easier to catch potential problems.
However, with DDL operations (e.g. DROP TABLE) in a transactional
context, there are still no warnings which would alert the user to potential
problems. Of course, in MySQL DDL operations are by nature not transactional,
but sometimes it is easy to forget this.
This is the first gotcha I've found for the current 5.0 series.
"INSERT INTO" seems to accept the phrase "VALUE"
as equivalent to the more usual "VALUES". While I'm not sure whether this is standard SQL, I've never encountered it before and can find no reference to this syntax on the documentation page at
http://dev.mysql.com/doc/refman/5.0/en/insert.html.
For example:
MySQL 5.0 is finally ready for the big time with the release of the first general availabilty version 5.0.15 following a long period of testing.
The addition of many new features such as stored procedures, triggers, views and cursors has finally brought MySQL onto the same playing field as other RDBMS products, both proprietary and open source, and puts it in a position to expand into the "enterprise" database market.
It is also a good reason to finally get around to updating (and hopefully reducing) the MySQL Gotchas - watch that space.