According to MySQL docs, it should still work atomically.  Granted, I
have only used this particular trick when they are on the same
filesystem.  Copying across filesystems, I imagine it should still be
atomic, but your system may be locked for awhile.

Obviously, a dedicated RENAME DATABASE command would have the same limitations.

 - michael dykman


On Fri, Dec 11, 2009 at 11:35 AM, Jim Lyons <[email protected]> wrote:
> Can you use that syntax if the databases are on different file systems?  If
> you can, and the original table is big, the command would take a while as it
> moved data from one file system to another.
>
> On Fri, Dec 11, 2009 at 7:58 AM, Johan De Meersman <[email protected]>wrote:
>
>> On Fri, Dec 11, 2009 at 1:56 PM, Ken D'Ambrosio <[email protected]> wrote:
>>
>> > > rename table oldschema.table to newschema.table;
>> >
>> > Just to be 100% clear -- I assume you have to first create the
>> destination
>> > database, and then do this for all the tables in the source database?
>> >
>>
>> Yep. Easily scriptable, though :-)
>>
>
>
>
> --
> Jim Lyons
> Web developer / Database administrator
> http://www.weblyons.com
>



-- 
 - michael dykman
 - [email protected]

"May you live every day of your life."
    Jonathan Swift

Larry's First Law of Language Redesign: Everyone wants the colon.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[email protected]

Reply via email to