~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_select.cc

  • Committer: devananda
  • Date: 2009-06-30 14:27:54 UTC
  • mfrom: (1030.2.4 trunk)
  • mto: (1093.1.7 captain)
  • mto: This revision was merged to the branch mainline in revision 1095.
  • Revision ID: devananda.vdv@gmail.com-20090630142754-vm9w374yxkf1pikc
mergeĀ fromĀ lp

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include "drizzled/nested_join.h"
35
35
#include "drizzled/probes.h"
36
36
#include "drizzled/show.h"
 
37
#include "drizzled/info_schema.h"
37
38
#include "drizzled/item/cache.h"
38
39
#include "drizzled/item/cmpfunc.h"
39
40
#include "drizzled/item/copy_string.h"
7991
7992
      }
7992
7993
      else
7993
7994
      {
7994
 
        if (table_list->schema_table && table_list->schema_table->i_s_requested_object & OPTIMIZE_I_S_TABLE)
 
7995
        if (table_list->schema_table && 
 
7996
            table_list->schema_table->getRequestedObject() & OPTIMIZE_I_S_TABLE)
7995
7997
        {
7996
 
          const char *tmp_buff;
7997
 
          int f_idx;
7998
7998
          if (table_list->has_db_lookup_value)
7999
7999
          {
8000
 
            f_idx= table_list->schema_table->idx_field1;
8001
 
            tmp_buff= table_list->schema_table->fields_info[f_idx].field_name;
8002
 
            tmp2.append(tmp_buff, strlen(tmp_buff), cs);
 
8000
            int f_idx= table_list->schema_table->getFirstColumnIndex();
 
8001
            const string &tmp_buff= table_list->schema_table->getColumnName(f_idx);
 
8002
            tmp2.append(tmp_buff.c_str(), tmp_buff.length(), cs);
8003
8003
          }
8004
8004
          if (table_list->has_table_lookup_value)
8005
8005
          {
8006
8006
            if (table_list->has_db_lookup_value)
8007
8007
              tmp2.append(',');
8008
 
            f_idx= table_list->schema_table->idx_field2;
8009
 
            tmp_buff= table_list->schema_table->fields_info[f_idx].field_name;
8010
 
            tmp2.append(tmp_buff, strlen(tmp_buff), cs);
 
8008
            int f_idx= table_list->schema_table->getSecondColumnIndex();
 
8009
            const string &tmp_buff= table_list->schema_table->getColumnName(f_idx);
 
8010
            tmp2.append(tmp_buff.c_str(), tmp_buff.length(), cs);
8011
8011
          }
8012
8012
          if (tmp2.length())
8013
8013
            item_list.push_back(new Item_string(tmp2.ptr(),tmp2.length(),cs));
8165
8165
        }
8166
8166
 
8167
8167
        if (table_list->schema_table &&
8168
 
            table_list->schema_table->i_s_requested_object & OPTIMIZE_I_S_TABLE)
 
8168
            table_list->schema_table->getRequestedObject() & OPTIMIZE_I_S_TABLE)
8169
8169
        {
8170
8170
          if (!table_list->table_open_method)
8171
8171
            extra.append(STRING_WITH_LEN("; Skip_open_table"));