• Igor Babaev's avatar
    MDEV-24019 Assertion is hit for query using recursive CTE with no default DB · a3f7f233
    Igor Babaev authored
    When the query using a recursive CTE whose definition contained wildcard
    symbols in the recursive part was processed at the prepare stage an
    assertion was hit if the query was executed without any default database
    set. The failure happened when the function insert_fields() tried to check
    column privileges for the temporary table created for a recursive
    reference to the CTE. No acl checks are needed for any CTE. That's why this
    check should be blocked as well. The patch formulates a stricter condition
    at which this check is to be blocked that covers the case when a query
    using recursive CTEs is executed with no default database set.
    
    Approved by Oleksandr Byelkin <sanja@mariadb.com>
    a3f7f233
sql_base.cc 287 KB