From: Neil M. <nm...@us...> - 2001-05-20 18:09:57
|
Update of /cvsroot/firebird/interbase/dsql In directory usw-pr-cvs1:/tmp/cvs-serv10905/dsql Modified Files: pass1.c parse.y parse.c Log Message: Allow a udf to be used in a 'group by' clause. Index: pass1.c =================================================================== RCS file: /cvsroot/firebird/interbase/dsql/pass1.c,v retrieving revision 1.3 retrieving revision 1.4 diff -U3 -r1.3 -r1.4 --- pass1.c 2001/04/05 17:05:43 1.3 +++ pass1.c 2001/05/20 18:09:54 1.4 @@ -1818,6 +1818,9 @@ field == (FLD) reference->nod_arg[e_fld_field] && context == (CTX) reference->nod_arg[e_fld_context]) return FALSE; + else + if (reference->nod_type == nod_udf ) + return FALSE; } return TRUE; } Index: parse.y =================================================================== RCS file: /cvsroot/firebird/interbase/dsql/parse.y,v retrieving revision 1.2 retrieving revision 1.3 diff -U3 -r1.2 -r1.3 --- parse.y 2001/01/18 00:47:28 1.2 +++ parse.y 2001/05/20 18:09:54 1.3 @@ -2481,8 +2481,10 @@ ; grp_column_elem : column_name + | udf | column_name COLLATE symbol_collation_name { $$ = make_node (nod_collate, e_coll_count, (NOD) $3, $1); } + ; having_clause : HAVING search_condition Index: parse.c =================================================================== RCS file: /cvsroot/firebird/interbase/dsql/parse.c,v retrieving revision 1.2 retrieving revision 1.3 diff -U3 -r1.2 -r1.3 --- parse.c 2001/01/18 00:47:28 1.2 +++ parse.c 2001/05/20 18:09:54 1.3 @@ -1,3 +1,13 @@ +#ifndef lint +static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#endif +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define yyclearin (DSQL_yychar=(-1)) +#define yyerrok (DSQL_yyerrflag=0) +#define YYRECOVERING (DSQL_yyerrflag!=0) +#define YYPREFIX "yy" /* [...9528 lines suppressed...] +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); +yyaccept: + return (0); } - |