~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.cc

Use List::begin()

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
/* Functions to handle keys and fields in forms */
18
18
 
19
 
#include "config.h"
20
 
#include "drizzled/table.h"
21
 
#include "drizzled/key.h"
22
 
#include "drizzled/field/blob.h"
23
 
#include "drizzled/util/test.h"
 
19
#include <config.h>
 
20
#include <drizzled/table.h>
 
21
#include <drizzled/key.h>
 
22
#include <drizzled/field/blob.h>
 
23
#include <drizzled/util/test.h>
 
24
#include <drizzled/plugin/storage_engine.h>
24
25
 
25
26
#include <boost/dynamic_bitset.hpp>
26
27
 
63
64
int find_ref_key(KeyInfo *key, uint32_t key_count, unsigned char *record, Field *field,
64
65
                 uint32_t *key_length, uint32_t *keypart)
65
66
{
66
 
  register int i;
67
 
  register KeyInfo *key_info;
 
67
  int i;
 
68
  KeyInfo *key_info;
68
69
  uint32_t fieldpos;
69
70
 
70
71
  fieldpos= field->offset(record);
329
330
     idx        Key number
330
331
*/
331
332
 
332
 
void key_unpack(String *to, Table *table, uint32_t idx)
 
333
void key_unpack(String *to, const Table *table, uint32_t idx)
333
334
{
334
335
  KeyPartInfo *key_part,*key_part_end;
335
336
  Field *field;
449
450
    if (key_part->null_bit)
450
451
    {
451
452
      /* This key part allows null values; NULL is lower than everything */
452
 
      register bool field_is_null= key_part->field->is_null();
 
453
      bool field_is_null= key_part->field->is_null();
453
454
      if (*key)                                 // If range key is null
454
455
      {
455
456
        /* the range is expecting a null value */