~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

Merged fix from Andrew.

Show diffs side-by-side

added added

removed removed

Lines of Context:
667
667
 
668
668
static void check_limits_aii(uint64_t in_auto_increment_increment)
669
669
{
670
 
  global_system_variables.auto_increment_increment= 0;
 
670
  global_system_variables.auto_increment_increment= 1;
671
671
  if (in_auto_increment_increment < 1 || in_auto_increment_increment > UINT64_MAX)
672
672
  {
673
673
    cout << N_("Error: Invalid Value for auto_increment_increment");
678
678
 
679
679
static void check_limits_aio(uint64_t in_auto_increment_offset)
680
680
{
681
 
  global_system_variables.auto_increment_offset= 0;
 
681
  global_system_variables.auto_increment_offset= 1;
682
682
  if (in_auto_increment_offset < 1 || in_auto_increment_offset > UINT64_MAX)
683
683
  {
684
684
    cout << N_("Error: Invalid Value for auto_increment_offset");
700
700
 
701
701
static void check_limits_back_log(uint32_t in_back_log)
702
702
{
703
 
  back_log= 0;
 
703
  back_log= 50;
704
704
  if (in_back_log < 1 || in_back_log > 65535)
705
705
  {
706
706
    cout << N_("Error: Invalid Value for back_log");
711
711
 
712
712
static void check_limits_dpi(uint32_t in_div_precincrement)
713
713
{
714
 
  global_system_variables.div_precincrement= 0;
 
714
  global_system_variables.div_precincrement= 4;
715
715
  if (in_div_precincrement > DECIMAL_MAX_SCALE)
716
716
  {
717
717
    cout << N_("Error: Invalid Value for div-precision-increment");
722
722
 
723
723
static void check_limits_gcml(uint64_t in_group_concat_max_len)
724
724
{
725
 
  global_system_variables.group_concat_max_len= 0;
 
725
  global_system_variables.group_concat_max_len= 1024;
726
726
  if (in_group_concat_max_len > ULONG_MAX || in_group_concat_max_len < 4)
727
727
  {
728
728
    cout << N_("Error: Invalid Value for group_concat_max_len");
733
733
 
734
734
static void check_limits_join_buffer_size(uint64_t in_join_buffer_size)
735
735
{
736
 
  global_system_variables.join_buff_size= 0;
 
736
  global_system_variables.join_buff_size= (128*1024L);
737
737
  if (in_join_buffer_size < IO_SIZE*2 || in_join_buffer_size > ULONG_MAX)
738
738
  {
739
739
    cout << N_("Error: Invalid Value for join_buffer_size");
744
744
 
745
745
static void check_limits_map(uint32_t in_max_allowed_packet)
746
746
{
747
 
  global_system_variables.max_allowed_packet= 0;
 
747
  global_system_variables.max_allowed_packet= (1024*1024L);
748
748
  if (in_max_allowed_packet < 1024 || in_max_allowed_packet > 1024*1024L*1024L)
749
749
  {
750
750
    cout << N_("Error: Invalid Value for max_allowed_packet");
755
755
 
756
756
static void check_limits_mce(uint64_t in_max_connect_errors)
757
757
{
758
 
  max_connect_errors= 0;
 
758
  max_connect_errors= MAX_CONNECT_ERRORS;
759
759
  if (in_max_connect_errors < 1 || in_max_connect_errors > ULONG_MAX)
760
760
  {
761
761
    cout << N_("Error: Invalid Value for max_connect_errors");
766
766
 
767
767
static void check_limits_max_err_cnt(uint64_t in_max_error_count)
768
768
{
769
 
  global_system_variables.max_error_count= 0;
 
769
  global_system_variables.max_error_count= DEFAULT_ERROR_COUNT;
770
770
  if (in_max_error_count > 65535)
771
771
  {
772
772
    cout << N_("Error: Invalid Value for max_error_count");
777
777
 
778
778
static void check_limits_mhts(uint64_t in_max_heap_table_size)
779
779
{
780
 
  global_system_variables.max_heap_table_size= 0;
 
780
  global_system_variables.max_heap_table_size= (16*1024*1024L);
781
781
  if (in_max_heap_table_size < 16384 || in_max_heap_table_size > MAX_MEM_TABLE_SIZE)
782
782
  {
783
783
    cout << N_("Error: Invalid Value for max_heap_table_size");
799
799
 
800
800
static void check_limits_max_join_size(drizzled::ha_rows in_max_join_size)
801
801
{
802
 
  global_system_variables.max_join_size= 0;
 
802
  global_system_variables.max_join_size= INT32_MAX;
803
803
  if ((uint64_t)in_max_join_size < 1 || (uint64_t)in_max_join_size > INT32_MAX)
804
804
  {
805
805
    cout << N_("Error: Invalid Value for max_join_size");
810
810
 
811
811
static void check_limits_mlfsd(int64_t in_max_length_for_sort_data)
812
812
{
813
 
  global_system_variables.max_length_for_sort_data= 0;
 
813
  global_system_variables.max_length_for_sort_data= 1024;
814
814
  if (in_max_length_for_sort_data < 4 || in_max_length_for_sort_data > 8192*1024L)
815
815
  {
816
816
    cout << N_("Error: Invalid Value for max_length_for_sort_data");
821
821
 
822
822
static void check_limits_msfk(uint64_t in_max_seeks_for_key)
823
823
{
824
 
  global_system_variables.max_seeks_for_key= 0;
 
824
  global_system_variables.max_seeks_for_key= ULONG_MAX;
825
825
  if (in_max_seeks_for_key < 1 || in_max_seeks_for_key > ULONG_MAX)
826
826
  {
827
827
    cout << N_("Error: Invalid Value for max_seeks_for_key");
832
832
 
833
833
static void check_limits_max_sort_length(size_t in_max_sort_length)
834
834
{
835
 
  global_system_variables.max_sort_length= 0;
 
835
  global_system_variables.max_sort_length= 1024;
836
836
  if ((int64_t)in_max_sort_length < 4 || (int64_t)in_max_sort_length > 8192*1024L)
837
837
  {
838
838
    cout << N_("Error: Invalid Value for max_sort_length");
843
843
 
844
844
static void check_limits_mwlc(uint64_t in_min_examined_row_limit)
845
845
{
846
 
  global_system_variables.min_examined_row_limit= 0;
 
846
  global_system_variables.min_examined_row_limit= ULONG_MAX;
847
847
  if (in_min_examined_row_limit > ULONG_MAX)
848
848
  {
849
849
    cout << N_("Error: Invalid Value for min_examined_row_limit");
865
865
 
866
866
static void check_limits_pbs(uint64_t in_preload_buff_size)
867
867
{
868
 
  global_system_variables.preload_buff_size= 0;
 
868
  global_system_variables.preload_buff_size= (32*1024L);
869
869
  if (in_preload_buff_size < 1024 || in_preload_buff_size > 1024*1024*1024L)
870
870
  {
871
871
    cout << N_("Error: Invalid Value for preload_buff_size");
876
876
 
877
877
static void check_limits_qabs(uint32_t in_query_alloc_block_size)
878
878
{
879
 
  global_system_variables.query_alloc_block_size= 0;
 
879
  global_system_variables.query_alloc_block_size= QUERY_ALLOC_BLOCK_SIZE;
880
880
  if (in_query_alloc_block_size < 1024)
881
881
  {
882
882
    cout << N_("Error: Invalid Value for query_alloc_block_size");
887
887
 
888
888
static void check_limits_qps(uint32_t in_query_prealloc_size)
889
889
{
890
 
  global_system_variables.query_prealloc_size= 0;
 
890
  global_system_variables.query_prealloc_size= QUERY_ALLOC_PREALLOC_SIZE;
891
891
  if (in_query_prealloc_size < QUERY_ALLOC_PREALLOC_SIZE)
892
892
  {
893
893
    cout << N_("Error: Invalid Value for query_prealloc_size");
898
898
 
899
899
static void check_limits_rabs(size_t in_range_alloc_block_size)
900
900
{
901
 
  global_system_variables.range_alloc_block_size= 0;
 
901
  global_system_variables.range_alloc_block_size= RANGE_ALLOC_BLOCK_SIZE;
902
902
  if (in_range_alloc_block_size < RANGE_ALLOC_BLOCK_SIZE)
903
903
  {
904
904
    cout << N_("Error: Invalid Value for range_alloc_block_size");
909
909
 
910
910
static void check_limits_read_buffer_size(int32_t in_read_buff_size)
911
911
{
912
 
  global_system_variables.read_buff_size= 0;
 
912
  global_system_variables.read_buff_size= (128*1024L);
913
913
  if (in_read_buff_size < IO_SIZE*2 || in_read_buff_size > INT32_MAX)
914
914
  {
915
915
    cout << N_("Error: Invalid Value for read_buff_size");
920
920
 
921
921
static void check_limits_read_rnd_buffer_size(uint32_t in_read_rnd_buff_size)
922
922
{
923
 
  global_system_variables.read_rnd_buff_size= 0;
 
923
  global_system_variables.read_rnd_buff_size= (256*1024L);
924
924
  if (in_read_rnd_buff_size < 64 || in_read_rnd_buff_size > UINT32_MAX)
925
925
  {
926
926
    cout << N_("Error: Invalid Value for read_rnd_buff_size");
931
931
 
932
932
static void check_limits_sort_buffer_size(size_t in_sortbuff_size)
933
933
{
934
 
  global_system_variables.sortbuff_size= 0;
 
934
  global_system_variables.sortbuff_size= MAX_SORT_MEMORY;
935
935
  if ((uint32_t)in_sortbuff_size < MIN_SORT_MEMORY)
936
936
  {
937
937
    cout << N_("Error: Invalid Value for sort_buff_size");
942
942
 
943
943
static void check_limits_tdc(uint32_t in_table_def_size)
944
944
{
945
 
  table_def_size= 0;
 
945
  table_def_size= 128;
946
946
  if (in_table_def_size < 1 || in_table_def_size > 512*1024L)
947
947
  {
948
948
    cout << N_("Error: Invalid Value for table_def_size");
953
953
 
954
954
static void check_limits_toc(uint32_t in_table_cache_size)
955
955
{
956
 
  table_cache_size= 0;
 
956
  table_cache_size= TABLE_OPEN_CACHE_DEFAULT;
957
957
  if (in_table_cache_size < TABLE_OPEN_CACHE_MIN || in_table_cache_size > 512*1024L)
958
958
  {
959
959
    cout << N_("Error: Invalid Value for table_cache_size");
964
964
 
965
965
static void check_limits_tlwt(uint64_t in_table_lock_wait_timeout)
966
966
{
967
 
  table_lock_wait_timeout= 0;
 
967
  table_lock_wait_timeout= 50;
968
968
  if (in_table_lock_wait_timeout < 1 || in_table_lock_wait_timeout > 1024*1024*1024)
969
969
  {
970
970
    cout << N_("Error: Invalid Value for table_lock_wait_timeout");
980
980
 
981
981
static void check_limits_tmp_table_size(uint64_t in_tmp_table_size)
982
982
{
983
 
  global_system_variables.tmp_table_size= 0;
 
983
  global_system_variables.tmp_table_size= 16*1024*1024L;
984
984
  if (in_tmp_table_size < 1024 || in_tmp_table_size > MAX_MEM_TABLE_SIZE)
985
985
  {
986
986
    cout << N_("Error: Invalid Value for table_lock_wait_timeout");