~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to sql/mysqld.cc

Ensure that one can't from the command line set a variable too small. (Bug #2710)
Allow one to force lower_case_table_names to 0, even if the file system is case insensitive. This fixes some issues on Mac OS X (Bug #2994)
Added variables "lower_case_file_system", "version_compile_os" and "license"

Show diffs side-by-side

added added

removed removed

Lines of Context:
287
287
bool opt_log, opt_update_log, opt_bin_log, opt_slow_log;
288
288
bool opt_error_log= IF_WIN(1,0);
289
289
bool opt_disable_networking=0, opt_skip_show_db=0;
 
290
bool lower_case_table_names_used= 0;
290
291
my_bool opt_enable_named_pipe= 0, opt_debugging= 0;
291
292
my_bool opt_local_infile, opt_external_locking, opt_slave_compressed_protocol;
 
293
my_bool lower_case_file_system= 0;
292
294
uint delay_key_write_options= (uint) DELAY_KEY_WRITE_ON;
293
295
uint lower_case_table_names;
294
296
 
2106
2108
    get corrupted if accesses with names of different case.
2107
2109
  */
2108
2110
  if (!lower_case_table_names &&
2109
 
      test_if_case_insensitive(mysql_real_data_home) == 1)
 
2111
      (lower_case_file_system=
 
2112
       (test_if_case_insensitive(mysql_real_data_home) == 1)))
2110
2113
  {
2111
 
    sql_print_error("Warning: Setting lower_case_table_names=2 because file system for %s is case insensitive", mysql_real_data_home);
2112
 
    lower_case_table_names= 2;
 
2114
    if (lower_case_table_names_used)
 
2115
    {
 
2116
      sql_print_error("\
 
2117
Warning: You have forced lower_case_table_names to 0 through a command line \
 
2118
option, even if your file system '%s' is case insensitive.  This means that \
 
2119
you can corrupt an MyISAM table by accessing it with different cases.  You \
 
2120
should consider changing lower_case_table_names to 1 or 2",
 
2121
                      mysql_real_data_home);
 
2122
    }
 
2123
    else
 
2124
    {
 
2125
      sql_print_error("Warning: Setting lower_case_table_names=2 because file system for %s is case insensitive", mysql_real_data_home);
 
2126
      lower_case_table_names= 2;
 
2127
    }
2113
2128
  }
2114
2129
 
2115
2130
#ifdef HAVE_OPENSSL
4845
4860
    break;
4846
4861
  case OPT_LOWER_CASE_TABLE_NAMES:
4847
4862
    lower_case_table_names= argument ? atoi(argument) : 1;
 
4863
    lower_case_table_names_used= 1;
4848
4864
    break;
4849
4865
  }
4850
4866
  return 0;