hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dealmaker <vin...@gmail.com>
Subject Re: How to Rename & Create Mysql DB Table in Hadoop?
Date Wed, 20 May 2009 18:14:00 GMT

Should I use LOCK TABLE then?  How do I prevent my_table from being accessed
before I create my_table back?
And how do I run these mysql commands in hadoop?
Thanks.


Todd Lipcon-4 wrote:
> 
> On Wed, May 20, 2009 at 10:59 AM, dealmaker <vinkhc@gmail.com> wrote:
> 
>>
>> Your second option is similar to what I had in my original post,
>> following
>> are my mysql commands:
>> BEGIN;
>> RENAME TABLE my_table TO backup_table;
>> CREATE TABLE my_table LIKE backup_table;
>> COMMIT;
>>
> 
> FYI, the "BEGIN" and "COMMIT" there are useless. MySQL does not have
> transactional DDL - as soon as you execute that "RENAME" it actually
> commits
> your current transaction.
> 
> -Todd
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Rename---Create-Mysql-DB-Table-in-Hadoop--tp23629956p23640724.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Mime
View raw message