Skip to content
  • Dyre Tjeldvoll's avatar
    255ba351
    WL#11807: Add sysvar which prohibits pk-less tables · 255ba351
    Dyre Tjeldvoll authored
    Problem: Tables without PK can cause performance problems on the slave
    when doing row-based replication.
    
    Solution: Add a system variable sql_require_primary_key (global &
    session), which if set, causes CREATE or ALTER statements that would
    yield a table without PK, to fail with ER_TABLE_WITHOUT_PK
    
    Add a binlog event to propagate the setting of this variable to the
    slave, so that the slave applier will be able to follow the
    master. The original setting remains in effect for normal connections.
    
    Change-Id: Ide65c39a11c4fd6ddf5c450142450c13321e3f1f
    255ba351
    WL#11807: Add sysvar which prohibits pk-less tables
    Dyre Tjeldvoll authored
    Problem: Tables without PK can cause performance problems on the slave
    when doing row-based replication.
    
    Solution: Add a system variable sql_require_primary_key (global &
    session), which if set, causes CREATE or ALTER statements that would
    yield a table without PK, to fail with ER_TABLE_WITHOUT_PK
    
    Add a binlog event to propagate the setting of this variable to the
    slave, so that the slave applier will be able to follow the
    master. The original setting remains in effect for normal connections.
    
    Change-Id: Ide65c39a11c4fd6ddf5c450142450c13321e3f1f
Loading