~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/opt_range.cc

  • Committer: Brian Aker
  • Date: 2009-07-09 19:49:32 UTC
  • mfrom: (1085.1.10 mordred)
  • Revision ID: brian@gaz-20090709194932-o90qfzgk9xem5di1
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
*/
105
105
 
106
106
#include <drizzled/server_includes.h>
 
107
#include <drizzled/sql_base.h>
107
108
#include <drizzled/sql_select.h>
108
109
#include <drizzled/error.h>
109
110
#include <drizzled/cost_vect.h>
966
967
    other Error, both passed lists are unusable
967
968
*/
968
969
 
969
 
int imerge_list_or_list(RANGE_OPT_PARAM *param,
970
 
                        vector<SEL_IMERGE*> &im1,
971
 
                        vector<SEL_IMERGE*> &im2)
 
970
static int imerge_list_or_list(RANGE_OPT_PARAM *param,
 
971
                               vector<SEL_IMERGE*> &im1,
 
972
                               vector<SEL_IMERGE*> &im2)
972
973
{
973
974
  SEL_IMERGE *imerge= im1.front();
974
975
  im1.clear();
986
987
    true    Error
987
988
*/
988
989
 
989
 
bool imerge_list_or_tree(RANGE_OPT_PARAM *param,
990
 
                         vector<SEL_IMERGE*> &im1,
991
 
                         SEL_TREE *tree)
 
990
static bool imerge_list_or_tree(RANGE_OPT_PARAM *param,
 
991
                                vector<SEL_IMERGE*> &im1,
 
992
                                SEL_TREE *tree)
992
993
{
993
994
  vector<SEL_IMERGE*>::iterator imerge= im1.begin();
994
995
 
1015
1016
           */
1016
1017
 
1017
1018
SQL_SELECT *make_select(Table *head, table_map const_tables,
1018
 
                        table_map read_tables, COND *conds,
 
1019
                        table_map read_tables, COND *conds,
1019
1020
                        bool allow_null_cond,
1020
1021
                        int *error)
1021
1022
{
1533
1534
 
1534
1535
 
1535
1536
/*
1536
 
  Comparison function to be used QUICK_ROR_UNION_SELECT::queue priority
1537
 
  queue.
1538
 
 
1539
 
  SYNPOSIS
1540
 
    QUICK_ROR_UNION_SELECT::queue_cmp()
1541
 
      arg   Pointer to QUICK_ROR_UNION_SELECT
1542
 
      val1  First merged select
1543
 
      val2  Second merged select
1544
 
*/
1545
 
 
1546
 
int quick_ror_union_select_queue_cmp(void *arg, unsigned char *val1, unsigned char *val2)
1547
 
{
1548
 
  QUICK_ROR_UNION_SELECT *self= (QUICK_ROR_UNION_SELECT*)arg;
1549
 
  return self->head->file->cmp_ref(((QUICK_SELECT_I*)val1)->last_rowid,
1550
 
                                   ((QUICK_SELECT_I*)val2)->last_rowid);
1551
 
}
1552
 
 
1553
 
 
1554
 
/*
1555
1537
  Initialize quick select for row retrieval.
1556
1538
  SYNOPSIS
1557
1539
    reset()
2929
2911
  return info;
2930
2912
}
2931
2913
 
2932
 
void ror_intersect_cpy(ROR_INTERSECT_INFO *dst, const ROR_INTERSECT_INFO *src)
 
2914
static void ror_intersect_cpy(ROR_INTERSECT_INFO *dst,
 
2915
                              const ROR_INTERSECT_INFO *src)
2933
2916
{
2934
2917
  dst->param= src->param;
2935
2918
  memcpy(dst->covered_fields.bitmap, src->covered_fields.bitmap,
6073
6056
    Value of init_param
6074
6057
*/
6075
6058
 
6076
 
range_seq_t sel_arg_range_seq_init(void *init_param, uint32_t, uint32_t)
 
6059
static range_seq_t sel_arg_range_seq_init(void *init_param, uint32_t, uint32_t)
6077
6060
{
6078
6061
  SEL_ARG_RANGE_SEQ *seq= (SEL_ARG_RANGE_SEQ*)init_param;
6079
6062
  seq->at_start= true;
6140
6123
*/
6141
6124
 
6142
6125
//psergey-merge-todo: support check_quick_keys:max_keypart
6143
 
uint32_t sel_arg_range_seq_next(range_seq_t rseq, KEY_MULTI_RANGE *range)
 
6126
static uint32_t sel_arg_range_seq_next(range_seq_t rseq, KEY_MULTI_RANGE *range)
6144
6127
{
6145
6128
  SEL_ARG *key_tree;
6146
6129
  SEL_ARG_RANGE_SEQ *seq= (SEL_ARG_RANGE_SEQ*)rseq;