• Binbin's avatar
    Handle missing fields in dbSwapDatabases and swapMainDbWithTempDb (#12763) · 62419c01
    Binbin authored
    The change in dbSwapDatabases seems harmless. Because in non-clustered
    mode, dbBuckets calculations are strictly accurate and in cluster mode,
    we only have one DB. Modify it for uniformity (just like resize_cursor).
    
    The change in swapMainDbWithTempDb is needed in case we swap with the
    temp db, otherwise the overhead memory usage of db can be miscalculated.
    
    In addition we will swap all fields (including rehashing list), just for
    completeness (and reduce the chance of surprises in the future).
    
    Introduced in #12697.
    62419c01
server.h 181 KB