~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_select.cc

  • Committer: Brian Aker
  • Date: 2009-09-23 21:40:36 UTC
  • mfrom: (971.6.13 eday-purecov)
  • Revision ID: brian@gaz-20090923214036-bustj80ei8ysbayf
Old message removal by Eric (no actual code has been harmed in the production of
this patch...)

Show diffs side-by-side

added added

removed removed

Lines of Context:
588
588
      (((session->lex->current_select->cond_count+1) +
589
589
        session->lex->current_select->between_count)*m+1);
590
590
  if (! (key_fields= (optimizer::KeyField*) session->alloc(sz)))
591
 
    return true; /* purecov: inspected */
 
591
    return true;
592
592
  and_level= 0;
593
593
  field= end= key_fields;
594
594
 
1511
1511
  tab->cached_eq_ref_table=1;
1512
1512
  /* We can skip const tables only if not an outer table */
1513
1513
  if (tab->type == AM_CONST && !tab->first_inner)
1514
 
    return (tab->eq_ref_table=1);               /* purecov: inspected */
 
1514
    return (tab->eq_ref_table=1);
1515
1515
  if (tab->type != AM_EQ_REF || tab->table->maybe_null)
1516
1516
    return (tab->eq_ref_table=0);               // We must use this
1517
1517
  Item **ref_item=tab->ref.items;
2984
2984
          }
2985
2985
          break;
2986
2986
        case Item::COND_UNDEF:                  /* Impossible */
2987
 
          break; /* purecov: deadcode */
 
2987
          break;
2988
2988
      }
2989
2989
    }
2990
2990
 
3386
3386
  if (join->session->killed)            // If aborted by user
3387
3387
  {
3388
3388
    join->session->send_kill_message();
3389
 
    return NESTED_LOOP_KILLED;                   /* purecov: inspected */
 
3389
    return NESTED_LOOP_KILLED;
3390
3390
  }
3391
3391
  if (join_tab->use_quick != 2 || test_if_quick_select(join_tab) <= 0)
3392
3392
  {
3830
3830
  {
3831
3831
    if (error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE)
3832
3832
      return table->report_error(error);
3833
 
    return -1; /* purecov: inspected */
 
3833
    return -1;
3834
3834
  }
3835
3835
 
3836
3836
  return 0;
3855
3855
  {
3856
3856
    if (error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE)
3857
3857
      return table->report_error(error);
3858
 
    return -1; /* purecov: inspected */
 
3858
    return -1;
3859
3859
  }
3860
3860
  return 0;
3861
3861
}
4139
4139
          }
4140
4140
        }
4141
4141
        if (error > 0)
4142
 
          return(NESTED_LOOP_ERROR);        /* purecov: inspected */
 
4142
          return(NESTED_LOOP_ERROR);
4143
4143
        if (end_of_records)
4144
4144
          return(NESTED_LOOP_OK);
4145
4145
        if (join->send_records >= join->unit->select_limit_cnt &&
4196
4196
  if (join->session->killed)
4197
4197
  {                                             // Aborted by user
4198
4198
    join->session->send_kill_message();
4199
 
    return NESTED_LOOP_KILLED;             /* purecov: inspected */
 
4199
    return NESTED_LOOP_KILLED;
4200
4200
  }
4201
4201
  if (!join->first_record || end_of_records ||
4202
4202
      (idx=test_if_item_cache_changed(join->group_fields)) >= 0)
4354
4354
      /* Create new top level AND item */
4355
4355
      Item_cond_and *new_cond=new Item_cond_and;
4356
4356
      if (!new_cond)
4357
 
        return (COND*) 0;                       // OOM /* purecov: inspected */
 
4357
        return (COND*) 0;
4358
4358
      List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
4359
4359
      Item *item;
4360
4360
      while ((item=li++))
4384
4384
    {                                           // Or list
4385
4385
      Item_cond_or *new_cond=new Item_cond_or;
4386
4386
      if (!new_cond)
4387
 
        return (COND*) 0;                       // OOM /* purecov: inspected */
 
4387
        return (COND*) 0;
4388
4388
      List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
4389
4389
      Item *item;
4390
4390
      while ((item=li++))
5241
5241
    length++;
5242
5242
  if (!(join->sortorder=
5243
5243
        make_unireg_sortorder(order, &length, join->sortorder)))
5244
 
    goto err;                           /* purecov: inspected */
 
5244
    goto err;
5245
5245
 
5246
5246
  table->sort.io_cache= new IO_CACHE;
5247
5247
  memset(table->sort.io_cache, 0, sizeof(IO_CACHE));