Skip to content
  • Jon Olav Hauglid's avatar
    adc7951d
    Bug#30451117: REFACTOR CREATE_TMP_TABLE · adc7951d
    Jon Olav Hauglid authored
    create_tmp_table() is a big and convoluted function for creating
    internal temporary tables for use by the optimizer.
    
    This patch refactors the function:
    - Removes dead code
    - Removes usage of goto
    - Reduces scope of variables
    - Stop reuse of variables for multiple purposes
    - Avoids memory allocation until and if needed
    - Use more const
    
    The purpose is to make it easier to reason about Field and
    Item_field usage for temporary tables.
    
    Change-Id: Idd42649d804816fd7217d87d3cb5363605a24d1e
    adc7951d
    Bug#30451117: REFACTOR CREATE_TMP_TABLE
    Jon Olav Hauglid authored
    create_tmp_table() is a big and convoluted function for creating
    internal temporary tables for use by the optimizer.
    
    This patch refactors the function:
    - Removes dead code
    - Removes usage of goto
    - Reduces scope of variables
    - Stop reuse of variables for multiple purposes
    - Avoids memory allocation until and if needed
    - Use more const
    
    The purpose is to make it easier to reason about Field and
    Item_field usage for temporary tables.
    
    Change-Id: Idd42649d804816fd7217d87d3cb5363605a24d1e
Loading