Web lists-archives.com

Re: dump, drop database then merge/aggregate




On 29/02/2016 16:32, Steven Siebert wrote:

At risk of giving you too much rope to hang yourself: if you use mysqldump to dump the database, if you use the --replace flag you'll convert all INSERT statements to REPLACE, which when you merge will update or insert the record, effectively "merging" the data. This may be one approach you want to look at, but may not be appropriate depending on your specific situation.

I'd considered mentioning this myself, but this was the root of my comment about integrity - if the original database or tables are dropped, then the replace command will cause the data to poo all over the original dataset. As you mentioned in your (snipped) reply, this can go badly wrong in a short space of time without the correct controls in place. Even if they are in place, I'd have trouble sleeping at night if this were my circus.

Gary

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