term_row_id is currently declared as "INT", which in MySQL is a signed 32 bit integer. On wikidata.org, this field has already reached 83 Million, once it hits 2 Billion, it will overflow. Note that this is an auto-increment field, so it essentially counts how many rows were inserted into the table - this number will hit the 31 bit limit much faster than the size of the table would.
The solution is to declare the term_row_id to be an UNSIGNED BIGINT (full 64 bit). That should give us some head room.
We need to consult with ops about how to perform the conversion on the live site.
Version: unspecified
Severity: normal
Whiteboard: backlog