Re: UPSERT with non-unique index
The Natural Philosopher <[email protected]> Mon, 3 Aug 2020 16:30:27 +0100
| Newsgroups | comp.databases.mysql |
|---|---|
| Organization | A little, after lunch |
| Message-ID | <[email protected]> |
On 03/08/2020 10:38, J.O. Aho wrote: > On 03/08/2020 11.05, The Natural Philosopher wrote: >> On 02/08/2020 22:46, Lew Pitcher wrote: > >>> I'd roll the whole thing in a transaction >>> >>> START TRANSACTION; >>> >>> -- your sql goes here >>> >>> COMMIT; >>> >>> >> I don't use SQL often enough to remember that it has transactions >> these days :-( > > Yeah, it's quite recently they introduced xa transactions in MySQL, 2005. > At my time of life that seems like yesterday...That was about when I was needing to use them too. I remember looking at them and deciding it wasn't necessary for that application. And it was all legacy ISAM files as well. > >> Note that you appear to need to be using innoDB or another advanced >> engine and not MyISAM if you want to use transactions > > Yes, you need a db-engine like InnoDB or XtraDB which both support xa > transactions. > -- Canada is all right really, though not for the whole weekend. "Saki"