I am having problem when creating term with same slug in different taxonomies. I researched that Unique key is removed from slug in wp_terms table, so i am getting problem to figure out that why i am getting this problem and also i am can still see Unique key in WordPress database.

For ref:
-
https://core.trac.wordpress.org/ticket/22023#comment:49
-
https://codex.wordpress.org/Function_Reference/wp_unique_term_slug
Error:
[05-May-2016 12:17:49 UTC] WordPress database error Duplicate entry
’05-yhoo-commentary’ for key ‘slug’ for query INSERT INTO wp_terms
(name
, slug
, term_group
) VALUES (‘Deal Commentary & Pitch
Book’, ’05-yhoo-commentary’, 0) made by
do_action(‘wp_ajax_inline-save-tax’), call_user_func_array,
wp_ajax_inline_save_tax, wp_update_term, _split_shared_term
Was having the same problem on a couple of sites myself, but this thread not only gave me the answer, but hinted at why it had been happening 🙂
I create a new user for each database, with only permissions to that database, however even within that (given I don’t do it often) I guess what perms they’ll need to that database as I’m creating the user and blank database for the new WP site. Seems if you don’t give the user adequate permissions to the database, on the occasions WP updates change tables those table changes can fail while the WP site will assume they’ve succeeded and behave accordingly (e.g. ALTERing a table for the slug field index).
I didn’t bother to note which specific permission was missing, just gave the user most permissions for the database, and presto (as other permissions may occasionally be needed for other WP updates to work).