One of the more recent additions to MySQL’s list of system variables is the sql_generate_invisible_primary_key
variable. This variable was introduced in MySQL 8.0.30 along with the introduction of generated invisible primary keys (GIPKs).
The purpose of this variable is to allow us to specify whether or not the system will generate a GIPK when we omit a primary key from a table’s definition when creating the table.
By default the sql_generate_invisible_primary_key
is set to OFF
, which basically means that GIPKs are disabled by default. But we can change this to ON
in order to enable GIPKs.