~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.cc

  • Committer: Andrey Hristov
  • Date: 2008-08-06 00:04:45 UTC
  • mto: (264.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 266.
  • Revision ID: ahristov@mysql.com-20080806000445-84urmltikgwk9v5d
Constify the usage of CHARSET_INFO almost to the last place in the code.
99% of the parameters are const CHARSET_INFO * const cs.
Wherever possible stack variables are also double consted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
    {
134
134
      length= min(key_length, key_part->length);
135
135
      Field *field= key_part->field;
136
 
      CHARSET_INFO *cs= field->charset();
 
136
      const CHARSET_INFO * const cs= field->charset();
137
137
      uint bytes= field->get_key_image(to_key, length, Field::itRAW);
138
138
      if (bytes < length)
139
139
        cs->cset->fill(cs, (char*) to_key + bytes, length - bytes, ' ');
292
292
    if (!(key_part->key_type & (FIELDFLAG_NUMBER+FIELDFLAG_BINARY+
293
293
                                FIELDFLAG_PACK)))
294
294
    {
295
 
      CHARSET_INFO *cs= key_part->field->charset();
 
295
      const CHARSET_INFO * const cs= key_part->field->charset();
296
296
      uint char_length= key_part->length / cs->mbmaxlen;
297
297
      const uchar *pos= table->record[0] + key_part->offset;
298
298
      if (length > char_length)
351
351
    }
352
352
    if ((field=key_part->field))
353
353
    {
354
 
      CHARSET_INFO *cs= field->charset();
 
354
      const CHARSET_INFO * const cs= field->charset();
355
355
      field->val_str(&tmp);
356
356
      if (cs->mbmaxlen > 1 &&
357
357
          table->field[key_part->fieldnr - 1]->field_length !=