~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_select.cc

  • Committer: Monty Taylor
  • Date: 2008-08-22 04:23:29 UTC
  • mto: (365.1.2 drizzle)
  • mto: This revision was merged to the branch mainline in revision 368.
  • Revision ID: monty@inaugust.com-20080822042329-ldq50y12vcq8rxh8
Undid some stupid int->int16_t conversions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4943
4943
    Table *table= s->table;
4944
4944
    KEYUSE *keyuse,*start_key=0;
4945
4945
    double best_records= DBL_MAX;
4946
 
    uint16_t max_key_part=0;
 
4946
    uint32_t max_key_part=0;
4947
4947
    uint64_t bound_sj_equalities= 0;
4948
4948
    bool try_sj_inside_out= false;
4949
4949
    /*
5105
5105
        if (found_part == PREV_BITS(uint,keyinfo->key_parts) &&
5106
5106
            !ref_or_null_part)
5107
5107
        {                                         /* use eq key */
5108
 
          max_key_part= UINT16_MAX;
 
5108
          max_key_part= UINT32_MAX;
5109
5109
          if ((keyinfo->flags & (HA_NOSAME | HA_NULL_PART_KEY)) == HA_NOSAME)
5110
5110
          {
5111
5111
            tmp = prev_record_reads(join, idx, found_ref);
12583
12583
    -1   Reverse key can be used
12584
12584
*/
12585
12585
 
12586
 
static int test_if_order_by_key(order_st *order, Table *table, uint16_t idx,
12587
 
                                uint16_t *used_key_parts)
 
12586
static int test_if_order_by_key(order_st *order, Table *table, uint32_t idx,
 
12587
                                uint32_t *used_key_parts)
12588
12588
{
12589
12589
  KEY_PART_INFO *key_part,*key_part_end;
12590
12590
  key_part=table->key_info[idx].key_part;
12696
12696
test_if_subkey(order_st *order, Table *table, uint ref, uint ref_key_parts,
12697
12697
               const key_map *usable_keys)
12698
12698
{
12699
 
  uint16_t nr;
12700
 
  uint16_t min_length= UINT16_MAX;
12701
 
  uint16_t best= MAX_KEY;
12702
 
  uint16_t not_used;
 
12699
  uint32_t nr;
 
12700
  uint32_t min_length= UINT32_MAX;
 
12701
  uint32_t best= MAX_KEY;
 
12702
  uint32_t not_used;
12703
12703
  KEY_PART_INFO *ref_key_part= table->key_info[ref].key_part;
12704
12704
  KEY_PART_INFO *ref_key_part_end= ref_key_part + ref_key_parts;
12705
12705
 
12879
12879
test_if_skip_sort_order(JOIN_TAB *tab,order_st *order,ha_rows select_limit,
12880
12880
                        bool no_changes, const key_map *map)
12881
12881
{
12882
 
  int16_t ref_key;
 
12882
  int32_t ref_key;
12883
12883
  uint ref_key_parts;
12884
12884
  int order_direction;
12885
 
  uint16_t used_key_parts;
 
12885
  uint32_t used_key_parts;
12886
12886
  Table *table=tab->table;
12887
12887
  SQL_SELECT *select=tab->select;
12888
12888
  key_map usable_keys;
13945
13945
{
13946
13946
  reset_cache_read(cache);
13947
13947
  cache->records= 0;
13948
 
  cache->ptr_record= UINT16_MAX;
 
13948
  cache->ptr_record= UINT32_MAX;
13949
13949
}
13950
13950
 
13951
13951