~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_list.cc

  • Committer: Olaf van der Spek
  • Date: 2011-08-15 15:17:19 UTC
  • mto: This revision was merged to the branch mainline in revision 2408.
  • Revision ID: olafvdspek@gmail.com-20110815151719-8jp69yf9tbv89kvc
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
    while (Index_hint* hint= iter++)
171
171
    {
172
172
      /* process empty USE INDEX () */
173
 
      if (hint->type == INDEX_HINT_USE && !hint->key_name.str)
 
173
      if (hint->type == INDEX_HINT_USE && !hint->key_name)
174
174
      {
175
175
        if (hint->clause & INDEX_HINT_MASK_JOIN)
176
176
        {
194
194
        Check if an index with the given name exists and get his offset in
195
195
        the keys bitmask for the table
196
196
      */
197
 
      uint32_t pos= 0;
198
 
      if (not tbl->getShare()->doesKeyNameExist(hint->key_name.str, hint->key_name.length, pos))
 
197
      uint32_t pos= tbl->getShare()->doesKeyNameExist(hint->key_name);
 
198
      if (pos == UINT32_MAX)
199
199
      {
200
 
        my_error(ER_KEY_DOES_NOT_EXITS, MYF(0), hint->key_name.str, alias);
 
200
        my_error(ER_KEY_DOES_NOT_EXITS, MYF(0), hint->key_name, alias);
201
201
        return 1;
202
202
      }
203
203
      /* add to the appropriate clause mask */
217
217
         index_order[INDEX_HINT_USE].any() || have_empty_use_order ||
218
218
         index_group[INDEX_HINT_USE].any() || have_empty_use_group))
219
219
    {
220
 
      my_error(ER_WRONG_USAGE, MYF(0), index_hint_type_name[INDEX_HINT_USE],
221
 
               index_hint_type_name[INDEX_HINT_FORCE]);
 
220
      my_error(ER_WRONG_USAGE, MYF(0), index_hint_type_name[INDEX_HINT_USE], index_hint_type_name[INDEX_HINT_FORCE]);
222
221
      return 1;
223
222
    }
224
223
 
291
290
      while (Index_hint* hint= it++)
292
291
      {
293
292
        str->append(STRING_WITH_LEN(" "));
294
 
        hint->print(session, str);
 
293
        hint->print(*str);
295
294
      }
296
295
    }
297
296
  }