• Martin Hansson's avatar
    Bug#46019: ERROR 1356 When selecting from within another · 3bd24616
    Martin Hansson authored
                view that has Group By
          
    When SELECT'ing from a view that mentions another,
    materialized, view, access was being denied. The issue was
    resolved by lifting a special case which avoided such access
    checking in check_single_table_access. In the past, this was
    necessary since if such a check were performed, the error
    message would be downgraded to a warning in the case of SHOW
    CREATE VIEW. The downgrading of errors was meant to handle
    only that scenario, but could not distinguish the two as it
    read only the error messages.
          
    The special case was needed in the fix of bug no 36086.
    Before that, views were confused with derived tables.
          
    After bug no 35996 was fixed, the manipulation of errors
    during SHOW CREATE VIEW execution is not dependent on the
    actual error messages in the queue, it rather looks at the
    actual cause of the error and takes appropriate
    action. Hence the aforementioned special case is now
    superfluous and the bug is fixed.
    
    
    mysql-test/r/view_grant.result:
      Bug#46019: Test result.
    mysql-test/t/view_grant.test:
      Bug#46019: Test case.
    sql/sql_parse.cc:
      Bug#46019: fix.
    3bd24616
sql_parse.cc 233 KB