~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/opt_sum.cc

  • Committer: Brian Aker
  • Date: 2009-07-11 19:15:43 UTC
  • mto: This revision was merged to the branch mainline in revision 1093.
  • Revision ID: brian@gaz-20090711191543-7tpgoaqnrlw23n36
Fix TABLE_REF structure

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
#include <drizzled/item/sum.h>
53
53
#include <drizzled/item/cmpfunc.h>
54
54
 
55
 
static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref, Field* field,
 
55
static bool find_key_for_maxmin(bool max_fl, table_reference_st *ref, Field* field,
56
56
                                COND *cond, uint32_t *range_fl,
57
57
                                uint32_t *key_prefix_length);
58
 
static int reckey_in_range(bool max_fl, TABLE_REF *ref, Field* field,
 
58
static int reckey_in_range(bool max_fl, table_reference_st *ref, Field* field,
59
59
                            COND *cond, uint32_t range_fl, uint32_t prefix_len);
60
60
static int maxmin_in_range(bool max_fl, Field* field, COND *cond);
61
61
 
230
230
        if (expr->real_item()->type() == Item::FIELD_ITEM)
231
231
        {
232
232
          unsigned char key_buff[MAX_KEY_LENGTH];
233
 
          TABLE_REF ref;
 
233
          table_reference_st ref;
234
234
          uint32_t range_fl, prefix_len;
235
235
 
236
236
          ref.key_buff= key_buff;
378
378
        if (expr->real_item()->type() == Item::FIELD_ITEM)
379
379
        {
380
380
          unsigned char key_buff[MAX_KEY_LENGTH];
381
 
          TABLE_REF ref;
 
381
          table_reference_st ref;
382
382
          uint32_t range_fl, prefix_len;
383
383
 
384
384
          ref.key_buff= key_buff;
593
593
    1        We can use index to get MIN/MAX value
594
594
*/
595
595
 
596
 
static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo,
 
596
static bool matching_cond(bool max_fl, table_reference_st *ref, KEY *keyinfo,
597
597
                          KEY_PART_INFO *field_part, COND *cond,
598
598
                          key_part_map *key_part_used, uint32_t *range_fl,
599
599
                          uint32_t *prefix_len)
800
800
*/
801
801
 
802
802
 
803
 
static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref,
 
803
static bool find_key_for_maxmin(bool max_fl, table_reference_st *ref,
804
804
                                Field* field, COND *cond,
805
805
                                uint32_t *range_fl, uint32_t *prefix_len)
806
806
{
909
909
    1        WHERE was not true for the found row
910
910
*/
911
911
 
912
 
static int reckey_in_range(bool max_fl, TABLE_REF *ref, Field* field,
 
912
static int reckey_in_range(bool max_fl, table_reference_st *ref, Field* field,
913
913
                            COND *cond, uint32_t range_fl, uint32_t prefix_len)
914
914
{
915
915
  if (key_cmp_if_same(field->table, ref->key_buff, ref->key, prefix_len))