~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.cc

  • Committer: Brian Aker
  • Date: 2008-08-10 17:18:41 UTC
  • mfrom: (287.3.13 codestyle)
  • Revision ID: brian@tangent.org-20080810171841-pkvi2ky94wbd0nt5
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
*/
107
107
 
108
108
void key_copy(uchar *to_key, uchar *from_record, KEY *key_info,
109
 
              uint key_length)
 
109
              unsigned int key_length)
110
110
{
111
111
  uint length;
112
112
  KEY_PART_INFO *key_part;
125
125
        key_part->key_part_flag & HA_VAR_LENGTH_PART)
126
126
    {
127
127
      key_length-= HA_KEY_BLOB_LENGTH;
128
 
      length= min(key_length, key_part->length);
 
128
      length= min((uint16_t)key_length, key_part->length);
129
129
      key_part->field->get_key_image(to_key, length, Field::itRAW);
130
130
      to_key+= HA_KEY_BLOB_LENGTH;
131
131
    }
132
132
    else
133
133
    {
134
 
      length= min(key_length, key_part->length);
 
134
      length= min((uint16_t)key_length, key_part->length);
135
135
      Field *field= key_part->field;
136
136
      const CHARSET_INFO * const cs= field->charset();
137
137
      uint bytes= field->get_key_image(to_key, length, Field::itRAW);
174
174
*/
175
175
 
176
176
void key_restore(uchar *to_record, uchar *from_key, KEY *key_info,
177
 
                 uint key_length)
 
177
                 uint16_t key_length)
178
178
{
179
179
  uint length;
180
180
  KEY_PART_INFO *key_part;
372
372
      }
373
373
      
374
374
      if (key_part->length < field->pack_length())
375
 
        tmp.length(min(tmp.length(),key_part->length));
 
375
        tmp.length(min(tmp.length(),(uint32_t)key_part->length));
376
376
      to->append(tmp);
377
377
    }
378
378
    else