~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.cc

  • Committer: Brian Aker
  • Date: 2011-01-12 06:45:23 UTC
  • mto: (2073.1.4 catalogs)
  • mto: This revision was merged to the branch mainline in revision 2080.
  • Revision ID: brian@tangent.org-20110112064523-rqhptaqbph22qmj1
RemoveĀ customĀ error.

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>
24
 
#include <drizzled/plugin/storage_engine.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"
25
24
 
26
25
#include <boost/dynamic_bitset.hpp>
27
26
 
64
63
int find_ref_key(KeyInfo *key, uint32_t key_count, unsigned char *record, Field *field,
65
64
                 uint32_t *key_length, uint32_t *keypart)
66
65
{
67
 
  int i;
68
 
  KeyInfo *key_info;
 
66
  register int i;
 
67
  register KeyInfo *key_info;
69
68
  uint32_t fieldpos;
70
69
 
71
70
  fieldpos= field->offset(record);
330
329
     idx        Key number
331
330
*/
332
331
 
333
 
void key_unpack(String *to, const Table *table, uint32_t idx)
 
332
void key_unpack(String *to, Table *table, uint32_t idx)
334
333
{
335
334
  KeyPartInfo *key_part,*key_part_end;
336
335
  Field *field;
450
449
    if (key_part->null_bit)
451
450
    {
452
451
      /* This key part allows null values; NULL is lower than everything */
453
 
      bool field_is_null= key_part->field->is_null();
 
452
      register bool field_is_null= key_part->field->is_null();
454
453
      if (*key)                                 // If range key is null
455
454
      {
456
455
        /* the range is expecting a null value */