~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join.cc

  • Committer: vjsamuel1990 at gmail
  • Date: 2011-02-04 19:50:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2147.
  • Revision ID: vjsamuel1990@gmail.com-20110204195047-ovd8784opsxh774m
Merge change nested_join_st to NestedJoin

Show diffs side-by-side

added added

removed removed

Lines of Context:
4505
4505
      /* Ignore sj-nests: */
4506
4506
      if (!embedding->on_expr)
4507
4507
        continue;
4508
 
      nested_join_st *nested_join= embedding->getNestedJoin();
 
4508
      NestedJoin *nested_join= embedding->getNestedJoin();
4509
4509
      if (!nested_join->counter_)
4510
4510
      {
4511
4511
        /*
5245
5245
static COND *simplify_joins(Join *join, List<TableList> *join_list, COND *conds, bool top)
5246
5246
{
5247
5247
  TableList *table;
5248
 
  nested_join_st *nested_join;
 
5248
  NestedJoin *nested_join;
5249
5249
  TableList *prev_table= 0;
5250
5250
  List_iterator<TableList> li(*join_list);
5251
5251
 
5583
5583
      s->embedding_map.reset();
5584
5584
      do
5585
5585
      {
5586
 
        nested_join_st *nested_join= embedding->getNestedJoin();
 
5586
        NestedJoin *nested_join= embedding->getNestedJoin();
5587
5587
        s->embedding_map|= nested_join->nj_map;
5588
5588
        s->dependent|= embedding->getDepTables();
5589
5589
        embedding= embedding->getEmbedding();
5667
5667
    s= p_pos->getJoinTable();
5668
5668
    s->type= AM_SYSTEM;
5669
5669
    join->const_table_map|=s->table->map;
5670
 
    if ((tmp= s->join_read_const_table(p_pos)))
 
5670
    if ((tmp= s->joinReadConstTable(p_pos)))
5671
5671
    {
5672
5672
      if (tmp > 0)
5673
5673
        return 1;                       // Fatal error
5741
5741
          join->const_table_map|=table->map;
5742
5742
          set_position(join, const_count++, s, (optimizer::KeyUse*) 0);
5743
5743
          partial_pos= join->getSpecificPosInPartialPlan(const_count - 1);
5744
 
          if ((tmp= s->join_read_const_table(partial_pos)))
 
5744
          if ((tmp= s->joinReadConstTable(partial_pos)))
5745
5745
          {
5746
5746
            if (tmp > 0)
5747
5747
              return 1;                 // Fatal error
5793
5793
                if (create_ref_for_key(join, s, start_keyuse, found_const_table_map))
5794
5794
                  return 1;
5795
5795
                partial_pos= join->getSpecificPosInPartialPlan(const_count - 1);
5796
 
                if ((tmp=s->join_read_const_table(partial_pos)))
 
5796
                if ((tmp=s->joinReadConstTable(partial_pos)))
5797
5797
                {
5798
5798
                  if (tmp > 0)
5799
5799
                    return 1;                   // Fatal error
5958
5958
  TableList *table;
5959
5959
  while ((table= li++))
5960
5960
  {
5961
 
    nested_join_st *nested_join;
 
5961
    NestedJoin *nested_join;
5962
5962
    if ((nested_join= table->getNestedJoin()))
5963
5963
    {
5964
5964
      /*
6015
6015
}
6016
6016
 
6017
6017
/**
6018
 
  Set nested_join_st::counter=0 in all nested joins in passed list.
 
6018
  Set NestedJoin::counter=0 in all nested joins in passed list.
6019
6019
 
6020
 
    Recursively set nested_join_st::counter=0 for all nested joins contained in
 
6020
    Recursively set NestedJoin::counter=0 for all nested joins contained in
6021
6021
    the passed join_list.
6022
6022
 
6023
6023
  @param join_list  List of nested joins to process. It may also contain base
6029
6029
  TableList *table;
6030
6030
  while ((table= li++))
6031
6031
  {
6032
 
    nested_join_st *nested_join;
 
6032
    NestedJoin *nested_join;
6033
6033
    if ((nested_join= table->getNestedJoin()))
6034
6034
    {
6035
6035
      nested_join->counter_= 0;
6115
6115
  Join *join= last->join;
6116
6116
  for (;last_emb != NULL; last_emb= last_emb->getEmbedding())
6117
6117
  {
6118
 
    nested_join_st *nest= last_emb->getNestedJoin();
 
6118
    NestedJoin *nest= last_emb->getNestedJoin();
6119
6119
    
6120
6120
    bool was_fully_covered= nest->is_fully_covered();
6121
6121