Skip to content
  • John David Duncan's avatar
    8736284f
    bug#29205142 NDB UPGRADE FAILS AFTER REMOVAL OF MYSQL_UPGRADE (2 of 2: impl) · 8736284f
    John David Duncan authored
    A new Server_state_observer hook "after_dd_upgrade_from_57" is introduced in
    sql/replication.h. Plugins can use this hook to register a function
    which will be run after the migration of mysql 5.7 metadata into the
    Data Dictionary.
    
    wl#12413 removed the mysql_upgrade utility script and replaced it with a
    self-contained procedure inside the server. The new upgrade procedure runs
    earlier than the old one did, possibly before NDB is fully ready to handle
    user queries. This caused the code for migrating MySQL's privilege tables
    from NDB storage to standard InnoDB storage in 8.0 to fail (see wl#12507
    and wl#12711).
    
    In this patch, the NDB plugin uses the new after_dd_upgrade_from_57 hook
    to register a function that can handle the table migration at the proper
    time. The patch also adds some logic into the DD upgrade code to correctly
    create DD metadata for NDB distributed privilege tables, and it deletes the
    SQL script ndb_upgrade_privileges.sql which had been added in wl#12507.
    
    Change-Id: I94401b5184dd0291aca38d10cb6f0c12f27ec1c7
    8736284f
    bug#29205142 NDB UPGRADE FAILS AFTER REMOVAL OF MYSQL_UPGRADE (2 of 2: impl)
    John David Duncan authored
    A new Server_state_observer hook "after_dd_upgrade_from_57" is introduced in
    sql/replication.h. Plugins can use this hook to register a function
    which will be run after the migration of mysql 5.7 metadata into the
    Data Dictionary.
    
    wl#12413 removed the mysql_upgrade utility script and replaced it with a
    self-contained procedure inside the server. The new upgrade procedure runs
    earlier than the old one did, possibly before NDB is fully ready to handle
    user queries. This caused the code for migrating MySQL's privilege tables
    from NDB storage to standard InnoDB storage in 8.0 to fail (see wl#12507
    and wl#12711).
    
    In this patch, the NDB plugin uses the new after_dd_upgrade_from_57 hook
    to register a function that can handle the table migration at the proper
    time. The patch also adds some logic into the DD upgrade code to correctly
    create DD metadata for NDB distributed privilege tables, and it deletes the
    SQL script ndb_upgrade_privileges.sql which had been added in wl#12507.
    
    Change-Id: I94401b5184dd0291aca38d10cb6f0c12f27ec1c7
Loading