~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_lex.cc

  • Committer: Brian Aker
  • Date: 2010-10-12 06:13:30 UTC
  • mto: (1857.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1858.
  • Revision ID: brian@tangent.org-20101012061330-omrzr0yla4ybul3t
More testing around events.

Show diffs side-by-side

added added

removed removed

Lines of Context:
281
281
  lex->setCacheable(true);
282
282
 
283
283
  if (lex->statement) 
284
 
  {
285
284
    delete lex->statement;
286
 
    lex->statement= NULL;
287
 
  }
288
285
}
289
286
 
290
287
static int find_keyword(Lex_input_stream *lip, uint32_t len, bool function)
1302
1299
  options= 0;
1303
1300
  linkage= UNSPECIFIED_TYPE;
1304
1301
  no_error= no_table_names_allowed= 0;
1305
 
  uncacheable.reset();
 
1302
  uncacheable= 0;
1306
1303
}
1307
1304
 
1308
1305
void Select_Lex_Node::init_select()
1371
1368
  group_list.empty();
1372
1369
  db= 0;
1373
1370
  having= 0;
 
1371
  table_join_options= 0;
1374
1372
  in_sum_expr= with_wild= 0;
1375
1373
  options= 0;
1376
1374
  braces= 0;
1567
1565
       s && s != last;
1568
1566
       s= s->outer_select())
1569
1567
  {
1570
 
    if (! (s->uncacheable.test(UNCACHEABLE_DEPENDENT)))
 
1568
    if (!(s->uncacheable & UNCACHEABLE_DEPENDENT))
1571
1569
    {
1572
1570
      // Select is dependent of outer select
1573
 
      s->uncacheable.set(UNCACHEABLE_DEPENDENT);
1574
 
      s->uncacheable.set(UNCACHEABLE_UNITED);
 
1571
      s->uncacheable= (s->uncacheable & ~UNCACHEABLE_UNITED) |
 
1572
                       UNCACHEABLE_DEPENDENT;
1575
1573
      Select_Lex_Unit *munit= s->master_unit();
1576
 
      munit->uncacheable.set(UNCACHEABLE_UNITED);
1577
 
      munit->uncacheable.set(UNCACHEABLE_DEPENDENT);
 
1574
      munit->uncacheable= (munit->uncacheable & ~UNCACHEABLE_UNITED) |
 
1575
                       UNCACHEABLE_DEPENDENT;
1578
1576
      for (Select_Lex *sl= munit->first_select(); sl ; sl= sl->next_select())
1579
1577
      {
1580
1578
        if (sl != s &&
1581
 
            ! (sl->uncacheable.test(UNCACHEABLE_DEPENDENT) && sl->uncacheable.test(UNCACHEABLE_UNITED)))
1582
 
          sl->uncacheable.set(UNCACHEABLE_UNITED);
 
1579
            !(sl->uncacheable & (UNCACHEABLE_DEPENDENT | UNCACHEABLE_UNITED)))
 
1580
          sl->uncacheable|= UNCACHEABLE_UNITED;
1583
1581
      }
1584
1582
    }
1585
1583
    s->is_correlated= true;
1604
1602
List<Item>* Select_Lex_Node::get_item_list()
1605
1603
{ return NULL; }
1606
1604
 
1607
 
TableList *Select_Lex_Node::add_table_to_list(Session *, 
1608
 
                                              Table_ident *, 
1609
 
                                              LEX_STRING *, 
1610
 
                                              const bitset<NUM_OF_TABLE_OPTIONS>&,
1611
 
                                              thr_lock_type, 
1612
 
                                              List<Index_hint> *, 
1613
 
                                              LEX_STRING *)
 
1605
TableList *Select_Lex_Node::add_table_to_list (Session *, Table_ident *, LEX_STRING *, uint32_t,
 
1606
                                                  thr_lock_type, List<Index_hint> *, LEX_STRING *)
1614
1607
{
1615
1608
  return 0;
1616
1609
}
1617
1610
 
 
1611
uint32_t Select_Lex_Node::get_table_join_options()
 
1612
{
 
1613
  return 0;
 
1614
}
1618
1615
 
1619
1616
/*
1620
1617
  prohibit using LIMIT clause
1692
1689
  return &item_list;
1693
1690
}
1694
1691
 
 
1692
uint32_t Select_Lex::get_table_join_options()
 
1693
{
 
1694
  return table_join_options;
 
1695
}
1695
1696
 
1696
1697
bool Select_Lex::setup_ref_array(Session *session, uint32_t order_group_num)
1697
1698
{