~james-page/ubuntu/precise/mysql-5.5/misc-fixes

« back to all changes in this revision

Viewing changes to sql/ha_partition.h

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-06-11 07:34:33 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120611073433-l9za2ni4ipp848y3
Tags: 5.5.24-0ubuntu0.12.04.1
* SECURITY UPDATE: Update to 5.5.24 to fix security issues (LP: #1011371)
  - http://dev.mysql.com/doc/refman/5.5/en/news-5-5-24.html

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#define HA_PARTITION_INCLUDED
3
3
 
4
4
/*
5
 
   Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
 
5
   Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
6
6
 
7
7
  This program is free software; you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
177
177
  ha_rows   m_bulk_inserted_rows;
178
178
  /** used for prediction of start_bulk_insert rows */
179
179
  enum_monotonicity_info m_part_func_monotonicity_info;
 
180
  /** Sorted array of partition ids in descending order of number of rows. */
 
181
  uint32 *m_part_ids_sorted_by_num_of_records;
 
182
  /* Compare function for my_qsort2, for reversed order. */
 
183
  static int compare_number_of_records(ha_partition *me,
 
184
                                       const uint32 *a,
 
185
                                       const uint32 *b);
180
186
public:
181
187
  handler *clone(const char *name, MEM_ROOT *mem_root);
182
188
  virtual void set_part_info(partition_info *part_info)
197
203
  */
198
204
    ha_partition(handlerton *hton, TABLE_SHARE * table);
199
205
    ha_partition(handlerton *hton, partition_info * part_info);
200
 
    ha_partition(handlerton *hton, TABLE_SHARE *share,
201
 
                 partition_info *part_info_arg,
202
 
                 ha_partition *clone_arg,
 
206
    ha_partition(handlerton *hton, TABLE_SHARE *share,
 
207
                 partition_info *part_info_arg,
 
208
                 ha_partition *clone_arg,
203
209
                 MEM_ROOT *clone_mem_root_arg);
204
210
   ~ha_partition();
205
211
  /*
541
547
  virtual int extra(enum ha_extra_function operation);
542
548
  virtual int extra_opt(enum ha_extra_function operation, ulong cachesize);
543
549
  virtual int reset(void);
 
550
  /*
 
551
    Do not allow caching of partitioned tables, since we cannot return
 
552
    a callback or engine_data that would work for a generic engine.
 
553
  */
 
554
  virtual my_bool register_query_cache_table(THD *thd, char *table_key,
 
555
                                             uint key_length,
 
556
                                             qc_engine_callback
 
557
                                               *engine_callback,
 
558
                                             ulonglong *engine_data)
 
559
  {
 
560
    *engine_callback= NULL;
 
561
    *engine_data= 0;
 
562
    return FALSE;
 
563
  }
544
564
 
545
565
private:
546
566
  static const uint NO_CURRENT_PART_ID;
570
590
  */
571
591
 
572
592
private:
573
 
  /*
574
 
    Helper function to get the minimum number of partitions to use for
575
 
    the optimizer hints/cost calls.
576
 
  */
577
 
  void partitions_optimizer_call_preparations(uint *num_used_parts,
578
 
                                              uint *check_min_num,
579
 
                                              uint *first);
580
 
  ha_rows estimate_rows(bool is_records_in_range, uint inx,
581
 
                        key_range *min_key, key_range *max_key);
 
593
  /* Helper functions for optimizer hints. */
 
594
  ha_rows min_rows_for_estimate();
 
595
  uint get_biggest_used_partition(uint *part_index);
582
596
public:
583
597
 
584
598
  /*