~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2010-06-05 00:14:39 UTC
  • mto: This revision was merged to the branch mainline in revision 1592.
  • Revision ID: brian@gir-20100605001439-kn5v6oaspacx5q6l
Merge in change to getTable() to private the field objects.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2495
2495
  /* We assume here that table->field < NO_CACHED_FIELD_INDEX = UINT_MAX */
2496
2496
  if (cached_field_index < table->getShare()->sizeFields() &&
2497
2497
      !my_strcasecmp(system_charset_info,
2498
 
                     table->field[cached_field_index]->field_name, name))
 
2498
                     table->getField(cached_field_index)->field_name, name))
2499
2499
  {
2500
 
    field_ptr= table->field + cached_field_index;
 
2500
    field_ptr= table->getFields() + cached_field_index;
2501
2501
  }
2502
2502
  else if (table->getShare()->name_hash.records)
2503
2503
  {
2509
2509
        field_ptr points to field in TableShare. Convert it to the matching
2510
2510
        field in table
2511
2511
      */
2512
 
      field_ptr= (table->field + table->getShare()->positionFields(field_ptr));
 
2512
      field_ptr= (table->getFields() + table->getShare()->positionFields(field_ptr));
2513
2513
    }
2514
2514
  }
2515
2515
  else
2516
2516
  {
2517
 
    if (!(field_ptr= table->field))
 
2517
    if (!(field_ptr= table->getFields()))
2518
2518
      return((Field *)0);
2519
2519
    for (; *field_ptr; ++field_ptr)
2520
2520
      if (!my_strcasecmp(system_charset_info, (*field_ptr)->field_name, name))
2523
2523
 
2524
2524
  if (field_ptr && *field_ptr)
2525
2525
  {
2526
 
    *cached_field_index_ptr= field_ptr - table->field;
 
2526
    *cached_field_index_ptr= field_ptr - table->getFields();
2527
2527
    field= *field_ptr;
2528
2528
  }
2529
2529
  else
2532
2532
        my_strcasecmp(system_charset_info, name, "_rowid") ||
2533
2533
        table->getShare()->rowid_field_offset == 0)
2534
2534
      return((Field*) 0);
2535
 
    field= table->field[table->getShare()->rowid_field_offset-1];
 
2535
    field= table->getField(table->getShare()->rowid_field_offset-1);
2536
2536
  }
2537
2537
 
2538
2538
  update_field_dependencies(session, field, table);