Changeset 17105

Show
Ignore:
Timestamp:
29.08.2008 15:19:56 (11 years ago)
Author:
mdewsnip
Message:

Not sure why "gdbm-txtgz" was made the default, particularly since collections built with this don't work for me. Changing default back to "gdbm".

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/dbutil.pm

    r17104 r17105  
    3838    return &open_infodb_write_handle_sqlite($infodb_file_path); 
    3939    } 
    40     elsif ($infodb_type eq "gdbm") 
    41     { 
    42     return &open_infodb_write_handle_gdbm($infodb_file_path); 
    43     } 
    44  
    45     # Use text (gzipped) version ready for conversion to GDBM  
    46     # if the infodb type is empty or not one of the values above 
    47     return &open_infodb_write_handle_gdbm_txtgz($infodb_file_path); 
     40    elsif ($infodb_type eq "gdbm-txtgz") 
     41    { 
     42    return &open_infodb_write_handle_gdbm_txtgz($infodb_file_path); 
     43    } 
     44 
     45    # Use GDBM if the infodb type is empty or not one of the values above 
     46    return &open_infodb_write_handle_gdbm($infodb_file_path); 
    4847} 
    4948 
     
    5857    return &close_infodb_write_handle_sqlite($infodb_handle); 
    5958    } 
    60     elsif ($infodb_type eq "gdbm") 
    61     { 
    62     return &close_infodb_write_handle_gdbm($infodb_handle); 
    63     } 
    64  
    65     # Use text (gzipped) version ready for conversion to GDBM  
    66     # if the infodb type is empty or not one of the values above return 
    67     &close_infodb_write_handle_gdbm_txtgz($infodb_handle); 
     59    elsif ($infodb_type eq "gdbm-txtgz") 
     60    { 
     61    return &close_infodb_write_handle_gdbm_txtgz($infodb_handle); 
     62    } 
     63 
     64    # Use GDBM if the infodb type is empty or not one of the values above 
     65    &close_infodb_write_handle_gdbm($infodb_handle); 
    6866} 
    6967 
     
    7169sub get_default_infodb_type 
    7270{ 
    73     return "gdbm-txtgz"; 
     71    # The default is GDBM so everything works the same for existing collections 
     72    # To use something else, specify the "infodbtype" in the collection's collect.cfg file 
     73    return "gdbm"; 
    7474} 
    7575 
     
    8585    return &get_infodb_file_path_sqlite($collection_name, $infodb_directory_path); 
    8686    } 
    87     elsif ($infodb_type eq "gdbm") 
    88     { 
    89     return &get_infodb_file_path_gdbm($collection_name, $infodb_directory_path); 
    90     } 
    91  
    92     # Use text (gzipped) version ready for conversion to GDBM  
    93     # if the infodb type is empty or not one of the values above return 
    94     return &get_infodb_file_path_gdbm_txtgz($collection_name, $infodb_directory_path); 
     87    elsif ($infodb_type eq "gdbm-txtgz") 
     88    { 
     89    return &get_infodb_file_path_gdbm_txtgz($collection_name, $infodb_directory_path); 
     90    } 
     91 
     92    # Use GDBM if the infodb type is empty or not one of the values above 
     93    return &get_infodb_file_path_gdbm($collection_name, $infodb_directory_path); 
    9594} 
    9695 
     
    106105    return &read_infodb_file_sqlite($infodb_file_path, $infodb_map); 
    107106    } 
    108     elsif ($infodb_type eq "gdbm") 
    109     { 
    110     return &read_infodb_file_gdbm($infodb_file_path, $infodb_map); 
    111     } 
    112  
    113     # Use text (gzipped) version ready for conversion to GDBM  
    114     # if the infodb type is empty or not one of the values above return 
    115     return &read_infodb_file_gdbm_txtgz($infodb_file_path, $infodb_map); 
     107    elsif ($infodb_type eq "gdbm-txtgz") 
     108    { 
     109    return &read_infodb_file_gdbm_txtgz($infodb_file_path, $infodb_map); 
     110    } 
     111 
     112    # Use GDBM if the infodb type is empty or not one of the values above 
     113    return &read_infodb_file_gdbm($infodb_file_path, $infodb_map); 
    116114} 
    117115 
     
    128126    return &write_infodb_entry_sqlite($infodb_handle, $infodb_key, $infodb_map); 
    129127    } 
    130     elsif ($infodb_type eq "gdbm") 
    131     { 
    132     return &write_infodb_entry_gdbm($infodb_handle, $infodb_key, $infodb_map); 
    133     } 
    134  
    135     # Use text (gzipped) version ready for conversion to GDBM  
    136     # if the infodb type is empty or not one of the values above return 
    137     return &write_infodb_entry_gdbm_txtgz($infodb_handle, $infodb_key, $infodb_map); 
     128    elsif ($infodb_type eq "gdbm-txtgz") 
     129    { 
     130    return &write_infodb_entry_gdbm_txtgz($infodb_handle, $infodb_key, $infodb_map); 
     131    } 
     132 
     133    # Use GDBM if the infodb type is empty or not one of the values above 
     134    return &write_infodb_entry_gdbm($infodb_handle, $infodb_key, $infodb_map); 
    138135} 
    139136 
     
    265262    return $infodb_file_handle; 
    266263} 
     264 
    267265 
    268266sub close_infodb_write_handle_gdbm