• gkodinov/kgeorge@macbook.gmz's avatar
    Bug #21809: Error 1356 while selecting from view with grouping though underlying · 932d86bb
    gkodinov/kgeorge@macbook.gmz authored
                select OK.
    The SQL parser was using Item::name to transfer user defined function attributes
    to the user defined function (udf). It was not distinguishing between user defined 
    function call arguments and stored procedure call arguments. Setting Item::name 
    was causing Item_ref::print() method to print the argument as quoted identifiers 
    and caused views that reference aggregate functions as udf call arguments (and 
    rely on Item::print() for the text of the view to store) to throw an undefined 
    identifier error.
    Overloaded Item_ref::print to print aggregate functions as such when printing
    the references to aggregate functions taken out of context by split_sum_func2()
    Fixed the parser to properly detect using AS clause in stored procedure arguments
    as an error.
    Fixed printing the arguments of udf call to print properly the udf attribute.
    932d86bb
sql_yacc.yy 241 KB