On Mon, Dec 22, 2008 at 02:05:07PM -0800, dormando wrote: > I personally (and my company) use the crap out of it. Along with LOAD > DATA INFILE that was previously discussed. If one or the other goes away, > do we have alternatives? > > Think I've used INSERT IGNORE INTO ... SELECT FROM ... a bunch to > collapse data. There isn't really a way to handle bailouts in the middle, > nor is it always reasonable to adjust all of the data first. ie; You want > the constraint on one table but not another, for different views of the > data. > > We could potentially get by without using INSERT IGNORE in mogilefs by > handling and ignoring the errors... but bulk requeue attempts would bail > out in the middle, so we'd have to only do one at a time, which is slow.
I think what IGNORE wants to be is a flag to either abort on error or continue on error. i.e. please execute this query and if you encounter an error, keep processing the query. If i don't like result, i'll ROLLBACK myself. OR please execute this query and if you encounter an error, stop processing the query. In ndbapi this is a flag to execute() and in SQL the IGNORE keyword is kinda like it. The question remains - do you want the error messages at all? If you're loading in 10 million rows and 5 million are duplicate key errors.... perhaps you don't care about the error messages for them and don't particularly want to use the network bandwidth for getting them back.... Perhaps I want to ignore duplicate key errors and not ignore invalid data errors? (or the other way around. i.e. i know my data stream is corrupt if i get 2008-0-1 as a date). do we need some way to express this in SQL? -- Stewart Smith _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

