0

I have a INNODB table with txnno column without unique index but I have primary key on another column. Now I am inserting transaction from multiple places. And there are some concurrent insertion happening for same txnno.

So Is there it is required to use txnno as unique key or INNODB can have it implicitly.

And there is two type of entry. Form one place, I am using commit/rollback statment but there are some places Where I am not using that.

So how can I manage this without changing much code.

Also what is meant by 'no sessions' in the case of table locking.

2
  • Create UNIQUE (not primary) index by this column simply. And there is two type of entry. This is separate and independent task. – Akina Feb 25 at 8:52
  • Show us SHOW CREATE TABLE and a sample INSERT. What you ask for is possible, but I want the actual column names to show you how. – Rick James Feb 27 at 1:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.