~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
#include <algorithm>
61
61
 
62
62
using namespace std;
63
 
using namespace drizzled;
64
 
 
65
 
extern drizzled::plugin::StorageEngine *heap_engine;
 
63
 
 
64
namespace drizzled
 
65
{
 
66
 
 
67
extern plugin::StorageEngine *heap_engine;
66
68
extern std::bitset<12> test_flags;
67
69
 
68
70
/** Declarations of static functions used in this source file. */
3291
3293
      Apply heuristic: pre-sort all access plans with respect to the number of
3292
3294
      records accessed.
3293
3295
  */
3294
 
  my_qsort(join->best_ref + join->const_tables,
3295
 
           join->tables - join->const_tables, sizeof(JoinTable*),
3296
 
           straight_join ? join_tab_cmp_straight : join_tab_cmp);
 
3296
  internal::my_qsort(join->best_ref + join->const_tables,
 
3297
                     join->tables - join->const_tables, sizeof(JoinTable*),
 
3298
                     straight_join ? join_tab_cmp_straight : join_tab_cmp);
3297
3299
  if (straight_join)
3298
3300
  {
3299
3301
    optimize_straight_join(join, join_tables);
3996
3998
  JoinTable  *best_table; // the next plan node to be added to the curr QEP
3997
3999
 
3998
4000
  /* number of tables that remain to be optimized */
3999
 
  size_remain= my_count_bits(remaining_tables);
 
4001
  size_remain= internal::my_count_bits(remaining_tables);
4000
4002
 
4001
4003
  do {
4002
4004
    /* Find the extension of the current QEP with the lowest cost */
6243
6245
/**
6244
6246
  @} (end of group Query_Optimizer)
6245
6247
*/
 
6248
 
 
6249
} /* namespace drizzled */