• unknown's avatar
    BUG#25106: A USING clause in combination with a VIEW results in column · 6c41a043
    unknown authored
               aliases ignored
    When a column reference to a column in JOIN USING is resolved and a new 
    Item is created for this column the user defined name was lost.
    This fix preserves the alias by setting the name of the new Item to the
    original alias.
    
    
    mysql-test/r/join.result:
      BUG#25106: A USING clause in combination with a VIEW results in column
                 aliases ignored
       - test case
    mysql-test/t/join.test:
      BUG#25106: A USING clause in combination with a VIEW results in column
                 aliases ignored
       - test case
    sql/sql_base.cc:
      BUG#25106: A USING clause in combination with a VIEW results in column
                 aliases ignored
       - take the alias of the Item to be replaced and set it into the newly
         allocated Item.
    6c41a043
sql_base.cc 167 KB