Where to add wating for another thread in case of duplicate key error:
In maria_write, under err: we have a loop where we add back all the
keys we have changed.
Hm... we will have a big problem if we can't add back an unique key we
just deleted. To be safe, we should probably for now disable
versioning if there is more than one unique key. I will fix and push
Anyway, what you should do:
In ma_write.c:w_search() we have the code:
if ((*keyinfo->get_key)(&tmp_key, page_flag, nod_flag, &keypos))
Here you should do:
After the the loop 'while ( i-- > 0)' after all keys has been added
back, you should add something like:
if (wait_for_trid(info->dup_key_trid) == DEADLOCK)
You should also delete the information in 'KNOWN_BUGS.txt' about the
unique key problem.