• unknown's avatar
    WL#2486 - natural/using joins according to SQL:2003 · e486fe1f
    unknown authored
    Post-review fixes that simplify the way access rights
    are checked during name resolution and factor out all
    entry points to check access rights into one single
    function.
    
    
    sql/item.cc:
      Simplfied find_field_in_table - factored out all acces right checks
      into a separate function.
    sql/mysql_priv.h:
      Simplified the way we control whether to perform access right
      checks for columns.
    sql/sql_acl.cc:
      - Added new functon check_column_grant_in_table_ref that serves as a single
        point of entry to check access rights during name resolution for different
        kinds of table references.
      - Moved check_grant_column_in_sctx to sql_acl.cc where it
        logically belongs.
      - Removed the parameter check_grants - it is checked before
        calling the function.
    sql/sql_acl.h:
      - Added new function check_column_grant_in_table_ref.
      - Made check_grant_column_in_sctx available to other modules.
    sql/sql_base.cc:
      - Factored out all code that check access rights for columns during
        name resolution into one function - check_column_grant_in_table_ref.
      - Moved check_grant_column_in_sctx to sql_acl.cc where it
        logically belongs.
      - Removed the parameter check_grants - it is checked before
        calling the function.
    sql/table.cc:
      Removed code that duplicates the functionality of
      check_column_grant_in_table_ref, and called directly
      that function.
    sql/table.h:
      check_grants method is replaced by more general
      check_column_grant_in_table_ref.
    e486fe1f
table.h 28.8 KB