~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Stewart Smith
  • Date: 2008-09-25 08:57:27 UTC
  • mto: This revision was merged to the branch mainline in revision 408.
  • Revision ID: stewart@flamingspork.com-20080925085727-lwemz5gl6tvrp9ku
UDFs are now normal Item_func objects. Simplifies handling them a lot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3551
3551
          IDENT_sys '('
3552
3552
          {
3553
3553
            udf_func *udf= 0;
3554
 
            LEX *lex= Lex;
3555
 
            if (using_udf_functions &&
3556
 
                (udf= find_udf($1.str, $1.length)) &&
3557
 
                udf->type == UDFTYPE_AGGREGATE)
3558
 
            {
3559
 
              if (lex->current_select->inc_in_sum_expr())
3560
 
              {
3561
 
                my_parse_error(ER(ER_SYNTAX_ERROR));
3562
 
                DRIZZLE_YYABORT;
3563
 
              }
3564
 
            }
 
3554
            udf= find_udf($1.str, $1.length);
 
3555
 
3565
3556
            /* Temporary placing the result of find_udf in $3 */
3566
3557
            $<udf>$= udf;
3567
3558
          }
3591
3582
              udf_func *udf= $<udf>3;
3592
3583
              if (udf)
3593
3584
              {
3594
 
                if (udf->type == UDFTYPE_AGGREGATE)
3595
 
                {
3596
 
                  Select->in_sum_expr--;
3597
 
                }
3598
 
 
3599
3585
                item= Create_udf_func::s_singleton.create(thd, udf, $4);
3600
3586
              } else {
3601
3587
                /* fix for bug 250065, from Andrew Garner <muzazzi@gmail.com> */