~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/unique.cc

  • Committer: tdavies
  • Date: 2010-10-05 03:25:08 UTC
  • mto: (1816.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1817.
  • Revision ID: tdavies@molly-20101005032508-pd1cg5nmxziov9wv
change in file: ../drizzled/base.h. Converted C structs key_range and KEY_MULTI_RANGE to C++ classes

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/*
17
17
  Function to handle quick removal of duplicates
138
138
*/
139
139
 
140
140
double Unique::get_use_cost(uint32_t *, uint32_t nkeys, uint32_t key_size,
141
 
                            size_t max_in_memory_size_arg)
 
141
                            size_t max_in_memory_size)
142
142
{
143
143
  ulong max_elements_in_tree;
144
144
  ulong last_tree_elems;
145
145
  double result;
146
146
 
147
 
  max_elements_in_tree= ((ulong) max_in_memory_size_arg /
 
147
  max_elements_in_tree= ((ulong) max_in_memory_size /
148
148
                         ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size));
149
149
 
150
150
  last_tree_elems= nkeys % max_elements_in_tree;