List:General Discussion« Previous MessageNext Message »
From:Daevid Vincent Date:May 24 2006 10:50pm
Subject:How do I turn off error checking
View as plain text  
Semi related to this, as it appears in my searching that this is
unfortunately not a supported feature. Is there a flag or something that I
can put in my .sql file that will turn OFF any error checking, execute my
statements (so that even if one fails, the next one will be tried), then
turn it back on again at the end of the file? Sort of like how you can do
the "SET FOREIGN_KEY_CHECKS=0;" so something akin to "SET ERROR_CHECKS=0;"
or "SET FORCE=1;"

And, yes, I do know that there is a --force option for the importing, but I
cannot use that in my case. This is an automated script and generally I want
the SQL to fail on any errors b/c then I know the upgrade is hosed. This is
a special case where some people got a SQL upgrade (by hand) and some
didn't, hence the discrepency between the schemas.

DÆVID  

> -----Original Message-----
> From: Daevid Vincent [mailto:daevid@stripped] 
> Sent: Wednesday, May 24, 2006 12:13 PM
> To: mysql@stripped
> Subject: How do I add a column only if it doesn't exist?
> 
> I want to do something like this:
> 
> if not exists `hotel_page_templates`.`hpt_custom_fields`
> alter table `hotel_page_templates` add column 
> `hpt_custom_fields` text after
> `hpt_alternate_username`;
> 
> 
> ÐÆ5ÏÐ 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
> http://lists.mysql.com/mysql?unsub=1
> 
> 

Thread
How do I turn off error checkingDaevid Vincent25 May
Re: How do I turn off error checkingsheeri kritzer25 May
  • RE: How do I turn off error checkingDaevid Vincent25 May
Re: How do I turn off error checkingsheeri kritzer25 May