Skip to content
  • Lakshmi Narayanan Sreethar's avatar
    dbb49a6b
    Bug#29894166 DETECT INITIAL SYSTEM RESTART IN SCHEMA SYNC · dbb49a6b
    Lakshmi Narayanan Sreethar authored
    This patch fixes the following issue which is required for the fix of
    the actual issue to work. The actual fix of the bug is committed
    separately.
    
    After a Ndb_util_table gets upgraded, the table definition is never
    reloaded into the object. Fix that by reopening the table after an
    upgrade.
    
    Changes:
    storage/ndb/plugin/ndb_util_table.h:
     - Updated the open() method to optionally reload the table definition
       when requested.
     - The create() and upgrade() functions will now also load the table
       from NDB.
     - Refactored the upgrade() function to internally use create().
       Previously, it was not creating the indexes.
     - Updated the functions used by create/upgrade methods to use the
       table from the Ndb_util_object rather than the ones defined during
       table creation.
     - Reformated the Util_table_creator::create_or_upgrade_in_NDB() method.
    
    storage/ndb/plugin/ndb_table_guard.h:
     - Added a new public method reinit() to reload the table from NDB.
    
    storage/ndb/plugin/ndb_sql_metadata_table.h:
     - Updated the define_indexes to reflect the changes made to the base
       class methods.
    
    Change-Id: I6bdcd7b48ca6596a5c008ac66995b1a18faea617
    dbb49a6b
    Bug#29894166 DETECT INITIAL SYSTEM RESTART IN SCHEMA SYNC
    Lakshmi Narayanan Sreethar authored
    This patch fixes the following issue which is required for the fix of
    the actual issue to work. The actual fix of the bug is committed
    separately.
    
    After a Ndb_util_table gets upgraded, the table definition is never
    reloaded into the object. Fix that by reopening the table after an
    upgrade.
    
    Changes:
    storage/ndb/plugin/ndb_util_table.h:
     - Updated the open() method to optionally reload the table definition
       when requested.
     - The create() and upgrade() functions will now also load the table
       from NDB.
     - Refactored the upgrade() function to internally use create().
       Previously, it was not creating the indexes.
     - Updated the functions used by create/upgrade methods to use the
       table from the Ndb_util_object rather than the ones defined during
       table creation.
     - Reformated the Util_table_creator::create_or_upgrade_in_NDB() method.
    
    storage/ndb/plugin/ndb_table_guard.h:
     - Added a new public method reinit() to reload the table from NDB.
    
    storage/ndb/plugin/ndb_sql_metadata_table.h:
     - Updated the define_indexes to reflect the changes made to the base
       class methods.
    
    Change-Id: I6bdcd7b48ca6596a5c008ac66995b1a18faea617
Loading