~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.cc

  • Committer: Brian Aker
  • Date: 2008-08-16 22:34:15 UTC
  • mto: This revision was merged to the branch mainline in revision 346.
  • Revision ID: brian@tangent.org-20080816223415-n24esdpfcqi4pwpy
Refactor around classes. TABLE_LIST has been factored out of table.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
241
241
/**
242
242
  Compare if a key has changed.
243
243
 
244
 
  @param table          TABLE
 
244
  @param table          Table
245
245
  @param key            key to compare to row
246
246
  @param idx            Index used
247
247
  @param key_length     Length of key
258
258
    1   Key has changed
259
259
*/
260
260
 
261
 
bool key_cmp_if_same(TABLE *table,const uchar *key,uint idx,uint key_length)
 
261
bool key_cmp_if_same(Table *table,const uchar *key,uint idx,uint key_length)
262
262
{
263
263
  uint store_length;
264
264
  KEY_PART_INFO *key_part;
326
326
     idx        Key number
327
327
*/
328
328
 
329
 
void key_unpack(String *to,TABLE *table,uint idx)
 
329
void key_unpack(String *to,Table *table,uint idx)
330
330
{
331
331
  KEY_PART_INFO *key_part,*key_part_end;
332
332
  Field *field;
388
388
 
389
389
  SYNOPSIS
390
390
    is_key_used()
391
 
      table   TABLE object with which keys and fields are associated.
 
391
      table   Table object with which keys and fields are associated.
392
392
      idx     Key to be checked.
393
393
      fields  Bitmap of fields to be checked.
394
394
 
395
395
  NOTE
396
 
    This function uses TABLE::tmp_set bitmap so the caller should care
 
396
    This function uses Table::tmp_set bitmap so the caller should care
397
397
    about saving/restoring its state if it also uses this bitmap.
398
398
 
399
399
  RETURN VALUE
401
401
    FALSE  Otherwise
402
402
*/
403
403
 
404
 
bool is_key_used(TABLE *table, uint idx, const MY_BITMAP *fields)
 
404
bool is_key_used(Table *table, uint idx, const MY_BITMAP *fields)
405
405
{
406
406
  bitmap_clear_all(&table->tmp_set);
407
407
  table->mark_columns_used_by_index_no_reset(idx, &table->tmp_set);