List:Internals« Previous MessageNext Message »
From:Rick James Date:July 26 2010 9:02pm
Subject:Re: unique_checks and InnoDB primary key
View as plain text  
Ever?  Consider mysqldump + reload.  The table was correctly UNIQUE 
before the dump; nothing (in theory) could destroy the UNIQUEnes before 
the reload finishes.

On 3/4/10 11:35 AM, Venu Kalyan wrote:
>> Why should unique checks ever be turned off?  Wouldn't that violate the
>> UNIQUE constraint?  Or at least delay it until too late to do a proper
>> ROLLBACK?
>>      
> Well for many cases, its faster...when one is dumping and loading
> existing data; why should one go through the whole check when someone
> knows that there is no dups. Even internally alter table foo
> engine=MyISAM/InnoDB; should do the same by skipping validation part
> (wen re-creating the existing table)
>
> mysqldump also uses this mechanism...
> /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
>
> Thanks
> Venu
>
>    

-- 
Rick James - MySQL Geek

Thread
unique_checks and InnoDB primary keyZardosht Kasheff2 Mar
  • Re: unique_checks and InnoDB primary keySunny Bains2 Mar
    • Re: unique_checks and InnoDB primary keyZardosht Kasheff2 Mar
      • Re: unique_checks and InnoDB primary keySunny Bains3 Mar
        • Re: unique_checks and InnoDB primary keyZardosht Kasheff3 Mar
          • Re: unique_checks and InnoDB primary keySunny Bains3 Mar
            • Re: unique_checks and InnoDB primary keyZardosht Kasheff3 Mar
        • Re: unique_checks and InnoDB primary keyRick James4 Mar
          • Re: unique_checks and InnoDB primary keyVenu Kalyan4 Mar
            • Re: unique_checks and InnoDB primary keyRick James26 Jul