~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2010-07-16 05:40:08 UTC
  • mto: This revision was merged to the branch mainline in revision 1661.
  • Revision ID: brian@gaz-20100716054008-cfcvyu0akpwqnwqd
Encapsulate Table in field

Show diffs side-by-side

added added

removed removed

Lines of Context:
2500
2500
    return NULL;
2501
2501
  {
2502
2502
    /* This is a base table. */
2503
 
    assert(nj_col->table_ref->table == nj_col->table_field->table);
 
2503
    assert(nj_col->table_ref->table == nj_col->table_field->getTable());
2504
2504
    found_field= nj_col->table_field;
2505
2505
    update_field_dependencies(session, found_field, nj_col->table_ref->table);
2506
2506
  }
2740
2740
        field_to_set= fld;
2741
2741
      if (field_to_set)
2742
2742
      {
2743
 
        Table *table= field_to_set->table;
 
2743
        Table *table= field_to_set->getTable();
2744
2744
        if (session->mark_used_columns == MARK_COLUMNS_READ)
2745
2745
          table->setReadSet(field_to_set->field_index);
2746
2746
        else
4171
4171
      if ((field= field_iterator.field()))
4172
4172
      {
4173
4173
        /* Mark fields as used to allow storage engine to optimze access */
4174
 
        field->table->setReadSet(field->field_index);
 
4174
        field->getTable()->setReadSet(field->field_index);
4175
4175
        if (table)
4176
4176
        {
4177
4177
          table->covering_keys&= field->part_of_key;
4361
4361
      thus we safely can take table from the first field.
4362
4362
    */
4363
4363
    field= static_cast<Item_field *>(f++);
4364
 
    table= field->field->table;
 
4364
    table= field->field->getTable();
4365
4365
    table->auto_increment_field_not_null= false;
4366
4366
    f.rewind();
4367
4367
  }
4371
4371
    value= v++;
4372
4372
 
4373
4373
    Field *rfield= field->field;
4374
 
    table= rfield->table;
 
4374
    table= rfield->getTable();
4375
4375
 
4376
4376
    if (rfield == table->next_number_field)
4377
4377
      table->auto_increment_field_not_null= true;
4428
4428
      On INSERT or UPDATE fields are checked to be from the same table,
4429
4429
      thus we safely can take table from the first field.
4430
4430
    */
4431
 
    table= (*ptr)->table;
 
4431
    table= (*ptr)->getTable();
4432
4432
    table->auto_increment_field_not_null= false;
4433
4433
  }
4434
4434
  while ((field = *ptr++) && ! session->is_error())
4435
4435
  {
4436
4436
    value=v++;
4437
 
    table= field->table;
 
4437
    table= field->getTable();
4438
4438
    if (field == table->next_number_field)
4439
4439
      table->auto_increment_field_not_null= true;
4440
4440
    if (value->save_in_field(field, 0) < 0)