~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join.cc

  • Committer: Nathan Williams
  • Date: 2009-06-24 17:47:02 UTC
  • mto: This revision was merged to the branch mainline in revision 1082.
  • Revision ID: nathanlws@gmail.com-20090624174702-rs66w3tjdnb4jitj
The rest of the files in the drizzled directory were purged of the cmin macro and replace with std::min (except for the definition in globals.h and 1 usage in stacktrace.cc).

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
#include "drizzled/field/blob.h"
46
46
#include "mysys/my_bit.h"
47
47
 
 
48
#include <algorithm>
 
49
 
 
50
using namespace std;
 
51
 
48
52
/** Declarations of static functions used in this source file. */
49
53
static bool make_group_fields(JOIN *main_join, JOIN *curr_join);
50
54
static void calc_group_buffer(JOIN *join,order_st *group);
3839
3843
              tmp= record_count * table->file->index_only_read_time(key, tmp);
3840
3844
            }
3841
3845
            else
3842
 
              tmp= record_count*cmin(tmp,s->worst_seeks);
 
3846
              tmp= record_count * min(tmp,s->worst_seeks);
3843
3847
          }
3844
3848
        }
3845
3849
        else
4004
4008
              tmp= record_count * table->file->index_only_read_time(key, tmp);
4005
4009
            }
4006
4010
            else
4007
 
              tmp= record_count * cmin(tmp,s->worst_seeks);
 
4011
              tmp= record_count * min(tmp,s->worst_seeks);
4008
4012
          }
4009
4013
          else
4010
4014
            tmp= best_time;                    // Do nothing
6260
6264
      This is can't be to high as otherwise we are likely to use
6261
6265
      table scan.
6262
6266
    */
6263
 
    s->worst_seeks= cmin((double) s->found_records / 10,
6264
 
                        (double) s->read_time*3);
 
6267
    s->worst_seeks= min((double) s->found_records / 10,
 
6268
                        (double) s->read_time*3);
6265
6269
    if (s->worst_seeks < 2.0)                   // Fix for small tables
6266
6270
      s->worst_seeks=2.0;
6267
6271