~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_select.cc

  • Committer: Monty Taylor
  • Date: 2008-08-10 06:11:44 UTC
  • mto: (312.1.3 translations)
  • mto: This revision was merged to the branch mainline in revision 295.
  • Revision ID: monty@inaugust.com-20080810061144-llnyqeju5zckd6pw
Oy. Replaced max and min macros with std::max and std::min so that we get
strong typing. And, then, cast things in the right direction...

Show diffs side-by-side

added added

removed removed

Lines of Context:
4589
4589
  uint  and_level,i,found_eq_constant;
4590
4590
  KEY_FIELD *key_fields, *end, *field;
4591
4591
  uint sz;
4592
 
  uint m= max(select_lex->max_equal_elems,1);
 
4592
  uint m= max(select_lex->max_equal_elems,(uint32_t)1);
4593
4593
  
4594
4594
  /* 
4595
4595
    We use the same piece of memory to store both  KEY_FIELD 
4757
4757
      if (map == 1)                     // Only one table
4758
4758
      {
4759
4759
        TABLE *tmp_table=join->all_tables[tablenr];
4760
 
        keyuse->ref_table_rows= max(tmp_table->file->stats.records, 100);
 
4760
        keyuse->ref_table_rows= max(tmp_table->file->stats.records, (ha_rows)100);
4761
4761
      }
4762
4762
    }
4763
4763
    /*
6268
6268
  {
6269
6269
    uint blob_length=(uint) (join_tab->table->file->stats.mean_rec_length-
6270
6270
                             (join_tab->table->s->reclength- rec_length));
6271
 
    rec_length+=(uint) max(4,blob_length);
 
6271
    rec_length+=(uint) max((uint)4,blob_length);
6272
6272
  }
6273
6273
  join_tab->used_fields=fields;
6274
6274
  join_tab->used_fieldlength=rec_length;
10679
10679
    {
10680
10680
      signed int overflow;
10681
10681
 
10682
 
      dec= min(dec, DECIMAL_MAX_SCALE);
 
10682
      dec= min(dec, (uint8_t)DECIMAL_MAX_SCALE);
10683
10683
 
10684
10684
      /*
10685
10685
        If the value still overflows the field with the corrected dec,
15750
15750
  cache->length=length+blobs*sizeof(char*);
15751
15751
  cache->blobs=blobs;
15752
15752
  *blob_ptr=0;                                  /* End sequentel */
15753
 
  size=max(thd->variables.join_buff_size, cache->length);
 
15753
  size=max(thd->variables.join_buff_size, (ulong)cache->length);
15754
15754
  if (!(cache->buff=(uchar*) my_malloc(size,MYF(0))))
15755
15755
    return(1);                          /* Don't use cache */ /* purecov: inspected */
15756
15756
  cache->end=cache->buff+size;