summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@macbook.gmz>2006-10-24 15:26:41 +0300
committerunknown <gkodinov/kgeorge@macbook.gmz>2006-10-24 15:26:41 +0300
commitf51d0812a78ebd53be143fec274c532b94a65c12 (patch)
tree72d9d3c19fbeb5b6938a3cca98404b272cf861c4 /sql/sql_lex.h
parent6caacb9bbd1dc53e34ce338d85fbba7b95c798f9 (diff)
downloadmariadb-git-f51d0812a78ebd53be143fec274c532b94a65c12.tar.gz
Bug #21809: Error 1356 while selecting from view with grouping though underlying
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. mysql-test/r/udf.result: Bug #21809: Error 1356 while selecting from view with grouping though underlying select OK. - test cases mysql-test/t/udf.test: Bug #21809: Error 1356 while selecting from view with grouping though underlying select OK. - test cases sql/item.cc: Bug #21809: Error 1356 while selecting from view with grouping though underlying select OK. - Don't print the refs to SUM functions as refs. sql/item_func.cc: Bug #21809: Error 1356 while selecting from view with grouping though underlying select OK. - print the aliases in the udf calls sql/item_func.h: Bug #21809: Error 1356 while selecting from view with grouping though underlying select OK. - print the aliases in the udf calls sql/sql_lex.cc: Bug #21809: Error 1356 while selecting from view with grouping though underlying select OK. - disable aliases for arguments in stored routine calls sql/sql_lex.h: Bug #21809: Error 1356 while selecting from view with grouping though underlying select OK. - disable aliases for arguments in stored routine calls sql/sql_yacc.yy: Bug #21809: Error 1356 while selecting from view with grouping though underlying select OK. - disable aliases for arguments in stored routine calls - fix bison duplicate symbol warnings
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index fdf14c691e9..d7d480dabc3 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -580,6 +580,8 @@ public:
/* exclude this select from check of unique_table() */
bool exclude_from_table_unique_test;
+ List<udf_func> udf_list; /* udf function calls stack */
+
void init_query();
void init_select();
st_select_lex_unit* master_unit();