You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It allows you to enforce tables have a primary key. It has more meaning in MySQL because row-based replication benefits from it (Edit that: it very much applies to TiCDC), and InnoDB is less efficient when using its internal primary key. But it's still useful.
I discovered that TiCDC does not replicate tables without a primary key by default (although there is now an option for it). So this feature request actually has a lot of usage in TiDB to ensure CDC replication.
Note that MySQL now is getting another related feature that helps with this: Generated Invisible Primary Keys. It seems that this is already in the docs, but the version of MySQL that contains this (8.0.30) is not yet released.
This may also benefit TiCDC etc if we would implement it in TiDB.
Feature Request
Is your feature request related to a problem? Please describe:
Describe the feature you'd like:
This is a feature from MySQL 8.0:
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_sql_require_primary_key
It allows you to enforce tables have a primary key.
It has more meaning in MySQL because row-based replication benefits from it(Edit that: it very much applies to TiCDC), and InnoDB is less efficient when using its internal primary key. But it's still useful.Describe alternatives you've considered:
N/A - compatibility feature.
Teachability, Documentation, Adoption, Migration Strategy:
Compatibility feature
The text was updated successfully, but these errors were encountered: