~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-12-17 04:48:59 UTC
  • mto: This revision was merged to the branch mainline in revision 1246.
  • Revision ID: osullivan.padraig@gmail.com-20091217044859-qorpkp4911zypfv3
Added some dtrace probes for tracing the optimizer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
#include "drizzled/optimizer/range.h"
48
48
#include "drizzled/optimizer/sum.h"
49
49
#include "drizzled/records.h"
 
50
#include "drizzled/probes.h"
50
51
#include "mysys/my_bit.h"
51
52
 
52
53
#include <algorithm>
5928
5929
  if (join->const_tables != join->tables)
5929
5930
  {
5930
5931
    optimize_keyuse(join, keyuse_array);
5931
 
    if (choose_plan(join, all_table_map & ~join->const_table_map))
5932
 
      return(true);
 
5932
    DRIZZLE_QUERY_OPT_CHOOSE_PLAN_START(join->session->query, join->session->thread_id);
 
5933
    bool res= choose_plan(join, all_table_map & ~join->const_table_map);
 
5934
    DRIZZLE_QUERY_OPT_CHOOSE_PLAN_DONE(res ? 1 : 0);
 
5935
    if (res)
 
5936
      return true;
5933
5937
  }
5934
5938
  else
5935
5939
  {