From: Daevid Vincent
Date: December 11 2009 4:35am
Subject: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?
List-Archive: http://lists.mysql.com/mysql/219636
Message-Id: <0DE05E1B70484942A1D9AA2FA6CA3118@mascorp.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
How can it possibly be that mySQL doesn't allow you to rename a database? I
can't fathom how this can be a difficult task at all to do. Aren't mySQL
databases stored in a directory of the DB name? And for INNODB, can't you
just find the spot in the ibdata file and alter whatever needs to be
changed? This is absolutely absurd. Not even 5.1 has this most basic of
features.
We have nearly a billion rows. Exporting to a .sql file and importing again
can take nearly a week to do (3 days each way and that doesn't even begin
to touch on the fact the server would be down)! WTF!?
We're running Ubuntu LTS 8.04 w/ Ver 14.12 Distrib 5.0.51a, for
debian-linux-gnu (i486) using readline 5.2
Even the manual for 5.1 says this can lose data:
http://dev.mysql.com/doc/refman/5.1/en/rename-database.html
"This statement was added in MySQL 5.1.7 but was found to be dangerous and
was removed in MySQL 5.1.23...However, use of this statement could result
in loss of database contents, which is why it was removed. Do not use
RENAME DATABASE in earlier versions in which it is present."
Seriously? Please explain why a simple rename of a database is such a
daunting task to mySQL/Sun that all their brilliant minds can't figure this
one out?
Why isn't there even a bug report for this?
http://bugs.mysql.com/search.php?search_for=rename+database&boolean=on&stat
us[]=Active&severity=&limit=All&order_by=&cmd=display&phpver=&os=0&os_detai
ls=&bug_age=0&tags=&similar=&target=&defect_class=all&workaround_viability=
all&impact=all&fix_risk=all&fix_effort=all&triageneeded=