v.20.9Improvement

Implicitly Convert Primary Key to Not Null in MaterializeMySQL

Implicitly convert primary key to not null in MaterializeMySQL (Same as MySQL). Fixes #14114. #14397 (Winter Zhang).
Implicitly convert primary key columns to NOT NULL in MaterializeMySQL engine, aligning behavior with MySQL.

Why it matters

This feature ensures that primary key columns imported via MaterializeMySQL are treated as NOT NULL, matching the behavior of native MySQL databases. It eliminates inconsistencies and prevents potential bugs caused by nullable primary keys, improving data integrity and query reliability.

How to use it

No explicit action is required from the user. When using the MaterializeMySQL table engine to replicate MySQL tables, primary key columns will automatically be converted to NOT NULL. Simply create or reload MaterializeMySQL tables to benefit from this fix.