Re: UPSERT with non-unique index

Stanimir Stamenkov <[email protected]> Mon, 3 Aug 2020 20:45:03 +0300
Newsgroups comp.databases.mysql
Organization A noiseless patient Spider
Message-ID <[email protected]>
Sun, 2 Aug 2020 20:15:03 +0200, /J.O. Aho/:

> I would suggest you use
> 
> LOCK TABLES table WRITE;
> 
> <do what you did before>
> 
> UNLOCK TABLES;
> 
> 
> LOCK TABLES table WRITE;
> 
> UNLOCK TABLES;
> 
> https://www.mysqltutorial.org/mysql-table-locking/
> https://dev.mysql.com/doc/refman/5.7/en/lock-tables.html

Wouldn't this basically block concurrent inserts/updates?  I don't want 
to block all on the same table trying to insert/update different sets of 
data.

-- 
Stanimir