Dangerous command
Posted by Vadim | Vote on Planet MySQL
Remembering that I did RENAME DATABASE in MySQL 5.1.21 and found it useful I tried it with 5.1.24 (I was playing with 20GB InnoDB database, so dumping is not fastest way) and all my tries finished with “Syntax error”.
So RTMF and documentation says
“This statement was added in MySQL 5.1.7 but was found to be dangerous and was removed in MySQL 5.1.23.”
For me term ‘dangerous’ is interesting there , as I’d expect really dangerous is DROP DATABASE (which I hope will not be removed in next release) , and RENAME DATABASE is supposed to be kind of safe – just replaces old name to new one.
I guess there are some related bugs – and there are:
Bug#28360: RENAME DATABASE destroys routines
Bug#17565: RENAME DATABASE destroys events
so basically RENAME DATABASE destroyed all events and routines related to database.
And solution of bug is:
Removed the
RENAME DATABASE db1 TO db2
statement.
So it seems MySQL took an interesting practice to get GA released as soon as possible – just remove features that does not work instead of fix it.
The similar was with FEDERATED storage engine, which was disabled by default in 5.1.23 binaries, in contrast to previous version (but should be enabled again in 5.1.24).
That probably helps to get ‘Zero P1 bugs reported’
Reference: http://www.mysqlperformanceblog.com/2008/05/20/too-dangerous-command/
Thursday, August 27, 2009
RENAME DATABASE in MySQL 5.1.21 and found it useful I tried it with 5.1.24
Category:
MySQL
— SkyHi @ Thursday, August 27, 2009