~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join.cc

  • Committer: Brian Aker
  • Date: 2009-12-18 23:28:10 UTC
  • mfrom: (1240.7.8 explain-plan)
  • Revision ID: brian@gaz-20091218232810-8u72it1739fprbfm
MergeĀ fromĀ Padraig

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
#include "drizzled/optimizer/key_use.h"
47
47
#include "drizzled/optimizer/range.h"
48
48
#include "drizzled/optimizer/sum.h"
 
49
#include "drizzled/optimizer/explain_plan.h"
49
50
#include "drizzled/records.h"
50
51
#include "drizzled/probes.h"
51
52
#include "mysys/my_bit.h"
1197
1198
  {                                           
1198
1199
    /* Only test of functions */
1199
1200
    if (select_options & SELECT_DESCRIBE)
1200
 
      select_describe(this, false, false, false, (zero_result_cause?zero_result_cause:"No tables used"));
 
1201
    {
 
1202
      optimizer::ExplainPlan planner(this, 
 
1203
                                     false,
 
1204
                                     false,
 
1205
                                     false,
 
1206
                                     (zero_result_cause ? zero_result_cause : "No tables used"));
 
1207
      planner.printPlan();
 
1208
    }
1201
1209
    else
1202
1210
    {
1203
1211
      result->send_fields(*columns_list);
1270
1278
      order= 0;
1271
1279
    }
1272
1280
    having= tmp_having;
1273
 
    select_describe(this, need_tmp, order != 0 && !skip_sort_order,  select_distinct, !tables ? "No tables used" : NULL);
 
1281
    optimizer::ExplainPlan planner(this,
 
1282
                                   need_tmp,
 
1283
                                   order != 0 && ! skip_sort_order,
 
1284
                                   select_distinct,
 
1285
                                   ! tables ? "No tables used" : NULL);
 
1286
    planner.printPlan();
1274
1287
    return;
1275
1288
  }
1276
1289
 
5125
5138
{
5126
5139
  if (select_options & SELECT_DESCRIBE)
5127
5140
  {
5128
 
    select_describe(join, false, false, false, info);
5129
 
    return(0);
 
5141
    optimizer::ExplainPlan planner(join,
 
5142
                                   false,
 
5143
                                   false,
 
5144
                                   false,
 
5145
                                   info);
 
5146
    planner.printPlan();
 
5147
    return 0;
5130
5148
  }
5131
5149
 
5132
5150
  join->join_free();