~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Monty Taylor
  • Date: 2008-10-02 01:31:53 UTC
  • mfrom: (398.1.6 codestyle-new)
  • Revision ID: monty@inaugust.com-20081002013153-b097om921cd3j1pn
MergedĀ fromĀ stdint-includes-fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1931
1931
    1 error
1932
1932
*/
1933
1933
 
1934
 
static bool init_global_datetime_format(timestamp_type format_type,
 
1934
static bool init_global_datetime_format(enum enum_drizzle_timestamp_type format_type,
1935
1935
                                        DATE_TIME_FORMAT **var_ptr)
1936
1936
{
1937
1937
  /* Get command line option */
2118
2118
      can't get max_connections*5 but still got no less than was
2119
2119
      requested (value of wanted_files).
2120
2120
    */
2121
 
    max_open_files= max(max((uint32_t)wanted_files, max_connections*5),
2122
 
                        open_files_limit);
 
2121
    max_open_files= cmax(cmax((uint32_t)wanted_files, max_connections*5),
 
2122
                         open_files_limit);
2123
2123
    files= my_set_max_open_files(max_open_files);
2124
2124
 
2125
2125
    if (files < wanted_files)
2130
2130
          If we have requested too much file handles than we bring
2131
2131
          max_connections in supported bounds.
2132
2132
        */
2133
 
        max_connections= (uint32_t) min((uint32_t)files-10-TABLE_OPEN_CACHE_MIN*2,
 
2133
        max_connections= (uint32_t) cmin((uint32_t)files-10-TABLE_OPEN_CACHE_MIN*2,
2134
2134
                                     max_connections);
2135
2135
        /*
2136
2136
          Decrease table_cache_size according to max_connections, but
2137
 
          not below TABLE_OPEN_CACHE_MIN.  Outer min() ensures that we
 
2137
          not below TABLE_OPEN_CACHE_MIN.  Outer cmin() ensures that we
2138
2138
          never increase table_cache_size automatically (that could
2139
2139
          happen if max_connections is decreased above).
2140
2140
        */
2141
 
        table_cache_size= (uint32_t) min(max((files-10-max_connections)/2,
 
2141
        table_cache_size= (uint32_t) cmin(cmax((files-10-max_connections)/2,
2142
2142
                                          (uint32_t)TABLE_OPEN_CACHE_MIN),
2143
2143
                                      table_cache_size);
2144
2144
        if (global_system_variables.log_warnings)