~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/opt_sum.cc

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
#include <drizzled/sql_select.h>
52
52
 
53
53
static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref, Field* field,
54
 
                                COND *cond, uint *range_fl,
55
 
                                uint *key_prefix_length);
 
54
                                COND *cond, uint32_t *range_fl,
 
55
                                uint32_t *key_prefix_length);
56
56
static int reckey_in_range(bool max_fl, TABLE_REF *ref, Field* field,
57
 
                            COND *cond, uint range_fl, uint prefix_len);
 
57
                            COND *cond, uint32_t range_fl, uint32_t prefix_len);
58
58
static int maxmin_in_range(bool max_fl, Field* field, COND *cond);
59
59
 
60
60
 
229
229
        {
230
230
          unsigned char key_buff[MAX_KEY_LENGTH];
231
231
          TABLE_REF ref;
232
 
          uint range_fl, prefix_len;
 
232
          uint32_t range_fl, prefix_len;
233
233
 
234
234
          ref.key_buff= key_buff;
235
235
          Item_field *item_field= (Item_field*) (expr->real_item());
377
377
        {
378
378
          unsigned char key_buff[MAX_KEY_LENGTH];
379
379
          TABLE_REF ref;
380
 
          uint range_fl, prefix_len;
 
380
          uint32_t range_fl, prefix_len;
381
381
 
382
382
          ref.key_buff= key_buff;
383
383
          Item_field *item_field= (Item_field*) (expr->real_item());
593
593
 
594
594
static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo, 
595
595
                          KEY_PART_INFO *field_part, COND *cond,
596
 
                          key_part_map *key_part_used, uint *range_fl,
597
 
                          uint *prefix_len)
 
596
                          key_part_map *key_part_used, uint32_t *range_fl,
 
597
                          uint32_t *prefix_len)
598
598
{
599
599
  if (!cond)
600
600
    return 1;
685
685
  key_part_map org_key_part_used= *key_part_used;
686
686
  if (eq_type || between || max_fl == less_fl)
687
687
  {
688
 
    uint length= (key_ptr-ref->key_buff)+part->store_length;
 
688
    uint32_t length= (key_ptr-ref->key_buff)+part->store_length;
689
689
    if (ref->key_length < length)
690
690
    {
691
691
    /* Ultimately ref->key_length will contain the length of the search key */
797
797
      
798
798
static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref,
799
799
                                Field* field, COND *cond,
800
 
                                uint *range_fl, uint *prefix_len)
 
800
                                uint32_t *range_fl, uint32_t *prefix_len)
801
801
{
802
802
  if (!(field->flags & PART_KEY_FLAG))
803
803
    return 0;                                        // Not key field
804
804
 
805
805
  Table *table= field->table;
806
 
  uint idx= 0;
 
806
  uint32_t idx= 0;
807
807
 
808
808
  KEY *keyinfo,*keyinfo_end;
809
809
  for (keyinfo= table->key_info, keyinfo_end= keyinfo+table->s->keys ;
818
818
    */
819
819
    if (!table->keys_in_use_for_query.is_set(idx))
820
820
      continue;
821
 
    uint jdx= 0;
 
821
    uint32_t jdx= 0;
822
822
    *prefix_len= 0;
823
823
    for (part= keyinfo->key_part, part_end= part+keyinfo->key_parts ;
824
824
         part != part_end ;
903
903
*/
904
904
 
905
905
static int reckey_in_range(bool max_fl, TABLE_REF *ref, Field* field,
906
 
                            COND *cond, uint range_fl, uint prefix_len)
 
906
                            COND *cond, uint32_t range_fl, uint32_t prefix_len)
907
907
{
908
908
  if (key_cmp_if_same(field->table, ref->key_buff, ref->key, prefix_len))
909
909
    return 1;