I have a table with a VARCHAR primary key. Records are inserted into the table with a regular INSERT statement (without the IGNORE keyword) and sometimes two inserts happen concurrently with the same primary key value. Normally I'd expect to get a duplicated key error, but not in my case - the second statement is processed (ignored, discarded) without an error. If I try to do 2 inserts sequentially, then it works as expected (the error occurs).
Here is information about the db/table:
tx_isolation = REPEATABLE-READ
CREATE TABLE IF NOT EXISTS `token` (
`id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`value` text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
If you need more information, I'll gladly provide it. Thanks in advance.
Here is information about the db/table:
tx_isolation = REPEATABLE-READ
CREATE TABLE IF NOT EXISTS `token` (
`id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`value` text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
If you need more information, I'll gladly provide it. Thanks in advance.