SQL error after using Feeds Import with Taxonomies
Finally, I have discovered the problem. I deleted the taxonomy data with the module Taxonomy Manager. When importing the data with Feeds again, it believes that the data remains there, even if they longer no exists. From here, some failed imports can make database corrupted.

To regain integrity, I looked for the problem tid, and checked that it appears in field_data_* with entity_type = 'taxonomy_term' and field_revision_* with the same entity_type. I also appears in url_alias, and didn't find any more instance of tid's with the problems in any more tables. I truncated all these tables.

I also checked that both modules, when deleting taxonomy terms, if the tables are empty, they don't make an additional TRUNCATE, so the new tid's don't start at tid = 1.