~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2011-01-25 07:24:41 UTC
  • mfrom: (2104.3.14 alter-table)
  • Revision ID: brian@tangent.org-20110125072441-gf9f14lkxjhvvku9
MergeĀ inĀ alter/parser

Show diffs side-by-side

added added

removed removed

Lines of Context:
609
609
  Session *session= lex->session;
610
610
 
611
611
  if (!(select_lex= new (session->mem_root) Select_Lex()))
612
 
    return(1);
 
612
    return true;
 
613
 
613
614
  select_lex->select_number= ++session->select_number;
614
615
  select_lex->parent_lex= lex; /* Used in init_query. */
615
616
  select_lex->init_query();
616
617
  select_lex->init_select();
617
618
  lex->nest_level++;
 
619
 
618
620
  if (lex->nest_level > (int) MAX_SELECT_NESTING)
619
621
  {
620
622
    my_error(ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT,MYF(0),MAX_SELECT_NESTING);
621
623
    return(1);
622
624
  }
 
625
 
623
626
  select_lex->nest_level= lex->nest_level;
624
627
  if (move_down)
625
628
  {
647
650
    if (lex->current_select->order_list.first && !lex->current_select->braces)
648
651
    {
649
652
      my_error(ER_WRONG_USAGE, MYF(0), "UNION", "order_st BY");
650
 
      return(1);
 
653
      return true;
651
654
    }
 
655
 
652
656
    select_lex->include_neighbour(lex->current_select);
653
657
    Select_Lex_Unit *unit= select_lex->master_unit();
654
 
    if (!unit->fake_select_lex && unit->add_fake_select_lex(lex->session))
655
 
      return(1);
 
658
 
 
659
    if (not unit->fake_select_lex && unit->add_fake_select_lex(lex->session))
 
660
      return true;
 
661
 
656
662
    select_lex->context.outer_context=
657
663
                unit->first_select()->context.outer_context;
658
664
  }
665
671
    list
666
672
  */
667
673
  select_lex->context.resolve_in_select_list= true;
668
 
  return(0);
 
674
 
 
675
  return false;
669
676
}
670
677
 
671
678
/**