~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/unique.cc

  • Committer: Brian Aker
  • Date: 2010-09-20 00:00:20 UTC
  • Revision ID: brian@tangent.org-20100920000020-s6x30brpajr83pkr
Update session/memory to use boost specific.

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;