• unknown's avatar
    Fix bug #12993 View column rename broken in subselect · b3dc4ea3
    unknown authored
    When view column aliased in subselect alias is set on ref which represents
    field. When tmp table is created for subselect, it takes name of original field
    not ref. Because of this alias on view column in subselect is lost. Which
    results in reported error.
    
    Now when alias is set on ref, it's set on ref real item too.
    
    
    mysql-test/r/view.result:
      Test case for bug #12993  View column rename broken in subselect
    mysql-test/t/view.test:
      Test case for bug #12993  View column rename broken in subselect
    sql/sql_base.cc:
      Fix bug #12993 View column rename broken in subselect
      Now when alias is set on ref, it's set on ref real item too.
    b3dc4ea3
sql_base.cc 157 KB