~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Andrew Hutchings
  • Date: 2010-10-22 13:52:10 UTC
  • mto: This revision was merged to the branch mainline in revision 1907.
  • Revision ID: andrew@linuxjedi.co.uk-20101022135210-puqqk8yg94cshbg4
Change default setting
Don't allow it to be less than sort-buffer-size
Move to pre-alloc for sort buffer

Show diffs side-by-side

added added

removed removed

Lines of Context:
1376
1376
  po::value<size_t>(&global_system_variables.sortbuff_size)->default_value(MAX_SORT_MEMORY)->notifier(&check_limits_sort_buffer_size),
1377
1377
  N_("Each thread that needs to do a sort allocates a buffer of this size."))
1378
1378
  ("sort-heap-threshold",
1379
 
  po::value<uint64_t>()->default_value(MAX_SORT_MEMORY*10),
1380
 
  N_("A global cap on the amount of memory that can be allocated by session sort buffers"))
 
1379
  po::value<uint64_t>()->default_value(0),
 
1380
  N_("A global cap on the amount of memory that can be allocated by session sort buffers (0 means unlimited)"))
1381
1381
  ("table-definition-cache", po::value<size_t>(&table_def_size)->default_value(128)->notifier(&check_limits_tdc),
1382
1382
  N_("The number of cached table definitions."))
1383
1383
  ("table-open-cache", po::value<uint64_t>(&table_cache_size)->default_value(TABLE_OPEN_CACHE_DEFAULT)->notifier(&check_limits_toc),
2223
2223
 
2224
2224
  if (vm.count("sort-heap-threshold"))
2225
2225
  {
 
2226
    if ((vm["sort-heap-threshold"].as<size_t>() > 0) and
 
2227
      (vm["sort-heap-threshold"].as<size_t>() < 
 
2228
      global_system_variables.sortbuff_size))
 
2229
    {
 
2230
      cout << N_("Error: sort-heap-threshold cannot be less than sort-buffer-size") << endl;
 
2231
      exit(-1);
 
2232
    }
 
2233
 
2226
2234
    global_sort_buffer.setMaxSize(vm["sort-heap-threshold"].as<uint64_t>());
2227
2235
  }
2228
2236